正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
@@ -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()); |
-
请 注册 或 登录 后发表评论