|
@@ -78,7 +78,7 @@ class Usercenter extends Api
|
|
$this->error('不存在的用户');
|
|
$this->error('不存在的用户');
|
|
}
|
|
}
|
|
|
|
|
|
- //
|
|
|
|
|
|
+ //用户数据
|
|
$userinfo = info_domain_image($userinfo,['avatar','photo_images']);
|
|
$userinfo = info_domain_image($userinfo,['avatar','photo_images']);
|
|
$idcard_confirm = Db::name('user_idconfirm')->where('user_id',$uid)->find();
|
|
$idcard_confirm = Db::name('user_idconfirm')->where('user_id',$uid)->find();
|
|
$new_data = [
|
|
$new_data = [
|
|
@@ -88,6 +88,22 @@ class Usercenter extends Api
|
|
|
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
+ //亲密度,登录用户给当前用户花了多少钱
|
|
|
|
+ $gift_map = [
|
|
|
|
+ 'user_id' => $this->auth->id,
|
|
|
|
+ 'user_to_id' => $uid,
|
|
|
|
+ ];
|
|
|
|
+ $gift_user_typing = Db::name('gift_user_typing')->where($gift_map)->sum('price');//文字聊天送礼物
|
|
|
|
+ $gift_user_party = Db::name('gift_user_party')->where($gift_map)->sum('value');//派对音聊送礼物
|
|
|
|
+ $gift_user_livebc = Db::name('gift_user_livebc')->where($gift_map)->sum('price');//直播送礼物
|
|
|
|
+
|
|
|
|
+ $match_map_str = '(user_id = '.$this->auth->id.' and to_user_id = '.$uid.') or (user_id = '.$uid.' and to_user_id = '.$this->auth->id.')';
|
|
|
|
+ $match_typing = Db::name('user_match_typing_log')->where($match_map_str)->sum('price'); //聊天
|
|
|
|
+ $match_audio = Db::name('user_match_audio_log')->where($match_map_str)->sum('price'); //语音
|
|
|
|
+ $match_video = Db::name('user_match_video_log')->where($match_map_str)->sum('price'); //视频
|
|
|
|
+
|
|
|
|
+ $new_data['qinmi_sum'] = $gift_user_typing + $gift_user_party + $gift_user_livebc + $match_typing + $match_audio + $match_video;
|
|
|
|
+
|
|
$userinfo = array_merge($userinfo,$new_data);
|
|
$userinfo = array_merge($userinfo,$new_data);
|
|
//枚举
|
|
//枚举
|
|
$userinfo['education'] = Db::name('enum_education')->where('id',$userinfo['education_id'])->value('name');
|
|
$userinfo['education'] = Db::name('enum_education')->where('id',$userinfo['education_id'])->value('name');
|