Browse Source

接口修改

lizhen_gitee 10 months ago
parent
commit
a11ae768da

+ 2 - 3
application/api/controller/Index.php

@@ -139,8 +139,7 @@ class Index extends Api
         $mt_user_wallets = $mt_user_wallet->field(['id','user_id','vip_endtime','pay_money'])->whereIn('user_id',$user_to_id)->select();
         $mt_user_wallets = $mt_user_wallet->field(['id','user_id','vip_endtime','pay_money'])->whereIn('user_id',$user_to_id)->select();
 
 
         // 财富等级
         // 财富等级
-        $mt_wealth_levels = $mt_wealth_level->order('id desc')->select();
-        $mt_wealth_levels = array_column($mt_wealth_levels ?? [],'name','value');
+        $mt_wealth_levels = $mt_wealth_level->order('id desc')->column('value,image');
 
 
         foreach($list as $key => &$v) {
         foreach($list as $key => &$v) {
             if ($this->auth->gender == 1) { //用户是男的
             if ($this->auth->gender == 1) { //用户是男的
@@ -219,7 +218,7 @@ class Index extends Api
                 $name = '';
                 $name = '';
                 foreach ($mt_wealth_levels as $kkk=>$vvv){
                 foreach ($mt_wealth_levels as $kkk=>$vvv){
                     if ($pay_money > $kkk){
                     if ($pay_money > $kkk){
-                        $name = $vvv;
+                        $name = localpath_to_netpath($vvv);
                         break;
                         break;
                     }
                     }
                 }
                 }

+ 5 - 2
application/api/controller/Usercenter.php

@@ -97,11 +97,10 @@ class Usercenter extends Api
 
 
         //用户数据
         //用户数据
         $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();
 
 
         $new_data = [
         $new_data = [
             'age'            => birthtime_to_age($userinfo['birthday']),
             'age'            => birthtime_to_age($userinfo['birthday']),
-            'truename'       => ($userinfo['idcard_status'] == 1 && isset($idcard_confirm['truename'])) ? $idcard_confirm['truename'] : '',
+            'truename'       => '',
             'alipay_account' => '',
             'alipay_account' => '',
         ];
         ];
 
 
@@ -169,6 +168,10 @@ class Usercenter extends Api
         $userinfo['follow_num'] = $follow_num;
         $userinfo['follow_num'] = $follow_num;
         $userinfo['fans_num'] = $fans_num;
         $userinfo['fans_num'] = $fans_num;
 
 
+        //访客数
+        $visit_num = Db::name('user_visit')->where(['to_uid'=>$this->auth->id])->count('id');
+        $userinfo['visit_num'] = $visit_num;
+
         //查询是否打过招呼
         //查询是否打过招呼
         $count = Db::name('user_greet')->where(['user_id' => $this->auth->id, 'user_to_id' => $uid])->count('id');
         $count = Db::name('user_greet')->where(['user_id' => $this->auth->id, 'user_to_id' => $uid])->count('id');
         if ($count) {
         if ($count) {