Selaa lähdekoodia

私聊+互关=不要钱

lizhen_gitee 8 kuukautta sitten
vanhempi
commit
8071da3036
1 muutettua tiedostoa jossa 11 lisäystä ja 0 poistoa
  1. 11 0
      application/api/controller/Usercenter.php

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

@@ -629,6 +629,17 @@ class Usercenter extends Api
             $this->error('同性不能聊天~');
         }
 
+        //互关不要钱
+        $where = [
+            'uid' => $this->auth->id,
+            'follow_uid' => $to_user_id,
+            'status' => 1,
+        ];
+        $is_friend = Db::name('user_follow')->where($where)->find();
+        if($is_friend){
+            $this->success('success',array('money'=>''));
+        }
+
         //验证金额
         $wallet_info = Db::name('user_wallet')->where(['user_id' => $this->auth->id])->find();
         if ($wallet_info['vip_endtime'] >= time()) { //会员