1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\api\controller\tvuser;
- use app\common\controller\Api;
- use think\Db;
- /**
- * 会员接口,使用自动注册的用户
- */
- class User extends Api
- {
- protected $noNeedLogin = [];
- protected $noNeedRight = '*';
- //用户详细资料
- public function userinfo(){
- $info = $this->auth->getUserinfo_tv();
- $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);
- }
- }
|