소스 검색

私聊+互关=不要钱

lizhen_gitee 8 달 전
부모
커밋
8071da3036
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  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()) { //会员