正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
@@ -135,10 +135,10 @@ class PublicController extends RestBaseController | @@ -135,10 +135,10 @@ class PublicController extends RestBaseController | ||
135 | ->update($userData); | 135 | ->update($userData); |
136 | $re=Db::name('user')->where('id',$findThirdPartyUser['user_id'])->find(); | 136 | $re=Db::name('user')->where('id',$findThirdPartyUser['user_id'])->find(); |
137 | if (empty($re['mobile'])){ | 137 | if (empty($re['mobile'])){ |
138 | - $this->success("请先手机号注册!", ['token' => $token]); | 138 | + $this->success(['msg'=>'请先手机号注册!','code'=>'40001'], ['token' => $token]); |
139 | } | 139 | } |
140 | if ($re['status']!=1){ | 140 | if ($re['status']!=1){ |
141 | - $this->success("请先填写用户信息!", ['token' => $token]); | 141 | + $this->success(['msg'=>'请先填写用户信息!','code'=>'40002'], ['token' => $token]); |
142 | } | 142 | } |
143 | $this->success("登录成功!", ['token' => $token]); | 143 | $this->success("登录成功!", ['token' => $token]); |
144 | } else { | 144 | } else { |
@@ -174,10 +174,10 @@ class PublicController extends RestBaseController | @@ -174,10 +174,10 @@ class PublicController extends RestBaseController | ||
174 | $token = cmf_generate_user_token($userId, 'wxapp'); | 174 | $token = cmf_generate_user_token($userId, 'wxapp'); |
175 | $re=Db::name('user')->where('id',$userId)->find(); | 175 | $re=Db::name('user')->where('id',$userId)->find(); |
176 | if (empty($re['mobile'])){ | 176 | if (empty($re['mobile'])){ |
177 | - $this->success("请先手机号注册!", ['token' => $token]); | 177 | + $this->success(['msg'=>'请先手机号注册!','code'=>'40001'], ['token' => $token]); |
178 | } | 178 | } |
179 | if ($re['status']!=1){ | 179 | if ($re['status']!=1){ |
180 | - $this->success("请先填写用户信息!", ['token' => $token]); | 180 | + $this->success(['msg'=>'请先填写用户信息!','code'=>'40002'], ['token' => $token]); |
181 | } | 181 | } |
182 | $this->success("登陆成功!", ['token' => $token]); | 182 | $this->success("登陆成功!", ['token' => $token]); |
183 | }else{ | 183 | }else{ |
-
请 注册 或 登录 后发表评论