|
@@ -106,21 +106,7 @@ class Usercenter extends Api
|
|
|
'alipay_account' => ($userinfo['idcard_status'] == 1 && isset($idcard_confirm['alipay_account'])) ? $idcard_confirm['alipay_account'] : '',
|
|
|
];
|
|
|
|
|
|
- //亲密度,登录用户给当前用户花了多少钱
|
|
|
-/* $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'] = $qinmi_sum = $gift_user_typing + $gift_user_party + $gift_user_livebc + $match_typing + $match_audio + $match_video;*/
|
|
|
|
|
|
if ($this->auth->gender == 1) {
|
|
|
$qinmi_sum = Db::name('user_intimacy')->where(['uid' => $this->auth->id, 'other_uid' => $uid])->value('value');
|
|
@@ -130,29 +116,7 @@ class Usercenter extends Api
|
|
|
$qinmi_sum = 0;
|
|
|
}
|
|
|
$new_data['qinmi_sum'] = $qinmi_sum ? :0;
|
|
|
- //解锁开关
|
|
|
- /*$new_data['isshow_unlock_wechataccount'] = $qinmi_sum >= 15 ? 1 : 0; //满足15亲密值才展示
|
|
|
- if(config('site.open_unlock_wechataccount') == 0){
|
|
|
- $new_data['isshow_unlock_wechataccount'] = 0; //总开关,强制隐藏
|
|
|
- }
|
|
|
- $new_data['isshow_unlock_secretvideo'] = $qinmi_sum >= 15 ? 1 : 0; //满足15亲密值才展示
|
|
|
- $new_data['isshow_unlock_secretvideo'] = 1; //又不受限制了
|
|
|
|
|
|
- //上次解锁过期日期
|
|
|
- $check_map = [
|
|
|
- 'user_id' => $this->auth->id,
|
|
|
- 'to_user_id' => $uid,
|
|
|
- ];
|
|
|
- $order_secretvideo = Db::name('order_secretvideo')->where($check_map)->order('id desc')->value('endtime');
|
|
|
- $order_wechataccount = Db::name('order_wechataccount')->where($check_map)->order('id desc')->value('endtime');
|
|
|
- $new_data['unlock_secretvideo_endtime'] = !empty($order_secretvideo) ? $order_secretvideo : 0;
|
|
|
- $new_data['unlock_secretvideo_status'] = $new_data['unlock_secretvideo_endtime'] > time() ? 1 : 0;
|
|
|
- $new_data['unlock_wechataccount_endtime'] = !empty($order_wechataccount) ? $order_wechataccount : 0;
|
|
|
- $new_data['unlock_wechataccount_status'] = $new_data['unlock_wechataccount_endtime'] > time() ? 1 : 0;*/
|
|
|
-
|
|
|
- //提示语而已
|
|
|
- /* $new_data['unlock_secretvideo_notice'] = '是否花费'.config('site.unlock_secretvideo').'金币解锁一周(或年费vip可每日免费解锁一次)?';
|
|
|
- $new_data['unlock_wechataccount_notice'] = '是否花费'.config('site.unlock_wechataccount').'金币解锁一周(或年费vip可每日免费解锁一次)?';*/
|
|
|
|
|
|
//合并
|
|
|
$userinfo = array_merge($userinfo,$new_data);
|