作者 郭盛
1 个管道 的构建 通过 耗费 12 秒

修改接口

@@ -79,7 +79,9 @@ class User extends Api @@ -79,7 +79,9 @@ class User extends Api
79 $ret = $this->auth->login($result); 79 $ret = $this->auth->login($result);
80 if ($ret) { 80 if ($ret) {
81 $data = $this->auth->getUserinfo(); 81 $data = $this->auth->getUserinfo();
82 - Db::name('user')->where('id',$data['id'])->update(['type'=>$raw_data['type']]); 82 + if(!empty($raw_data['type'])){
  83 + Db::name('user')->where('id',$data['id'])->update(['type'=>$raw_data['type']]);
  84 + }
83 $this->success('登录成功', $data); 85 $this->success('登录成功', $data);
84 }else { 86 }else {
85 $this->error($this->auth->getError()); 87 $this->error($this->auth->getError());