Browse Source

我绑定的用户id

lizhen_gitee 8 months ago
parent
commit
a73975cc57
1 changed files with 12 additions and 0 deletions
  1. 12 0
      application/api/controller/tvuser/User.php

+ 12 - 0
application/api/controller/tvuser/User.php

@@ -20,4 +20,16 @@ class User extends Api
         $this->success(__('success'),$info);
     }
 
+    //获取绑定的用户
+    public function get_bind_userid(){
+        $bind_user = Db::name('user')->field('id,tv_userid,comefrom')->where('tv_userid',$this->auth->tv_userid)->where('id','NEQ',$this->auth->id)->where('comefrom',1)->find();
+
+        $rs = 0;
+        if(!empty($bind_user)){
+            $rs = $bind_user['id'];
+        }
+
+        $this->success(1,$rs);
+    }
+
 }