ソースを参照

接口补充数据

lizhen_gitee 8 ヶ月 前
コミット
824ecafa8b

+ 4 - 1
application/api/controller/Pay.php

@@ -109,7 +109,10 @@ class Pay extends Api
     public function gold_config(){
         $list = Db::name('paygold_config')->where('is_show',1)->order('weight asc,id asc')->select();
         $data['goldconfig'] = $list;
-        $data['gold'] = model('wallet')->getWallet($this->auth->id,'gold');
+
+        $user_wallet = model('wallet')->getWallet($this->auth->id);
+        $data['gold'] = $user_wallet['gold'];
+        $data['jewel'] = $user_wallet['jewel'];
         $data['money_to_gold'] = config('site.rmb_to_gold');
         $data['is_first'] = Db::name('user_paygold_log')->where(['uid' => $this->auth->id])->count('id');
 

+ 3 - 0
application/api/controller/Usercenter.php

@@ -251,6 +251,9 @@ class Usercenter extends Api
         //礼物墙
         $userinfo['gift_wall'] = $this->giftwall($uid);
 
+        //动态数量
+        $userinfo['dongtai_num'] = Db::name('topic_dongtai')->where(['user_id' => $uid, 'is_hidden' => 0, 'type' => ['in', [1, 2]], 'status' => 0, 'auit_status' => 1])->count();
+
         $this->success('success',$userinfo);
     }
 

+ 6 - 0
application/common/library/Auth.php

@@ -802,6 +802,12 @@ class Auth
         //礼物墙
         $userinfo['gift_wall'] = $this->giftwall($this->id);
 
+        //动态数量
+        $userinfo['dongtai_num'] = Db::name('topic_dongtai')->where(['user_id' => $this->id, 'is_hidden' => 0, 'type' => ['in', [1, 2]], 'status' => 0, 'auit_status' => 1])->count();
+
+        //积分数量
+        $userinfo['money'] = model('wallet')->getWallet($this->id,'money');
+        
         return $userinfo;
     }