正在显示
1 个修改的文件
包含
15 行增加
和
1 行删除
@@ -133,6 +133,13 @@ class PublicController extends RestBaseController | @@ -133,6 +133,13 @@ class PublicController extends RestBaseController | ||
133 | ->where('openid', $openid) | 133 | ->where('openid', $openid) |
134 | ->where('app_id', $appId) | 134 | ->where('app_id', $appId) |
135 | ->update($userData); | 135 | ->update($userData); |
136 | + $re=Db::name('user')->where('id',$findThirdPartyUser['user_id'])->find(); | ||
137 | + if (empty($re['mobile'])){ | ||
138 | + $this->success("请先手机号注册!", ['token' => $token]); | ||
139 | + } | ||
140 | + if ($re['status']!=1){ | ||
141 | + $this->success("请先填写用户信息!", ['token' => $token]); | ||
142 | + } | ||
136 | $this->success("登录成功!", ['token' => $token]); | 143 | $this->success("登录成功!", ['token' => $token]); |
137 | } else { | 144 | } else { |
138 | 145 | ||
@@ -165,7 +172,14 @@ class PublicController extends RestBaseController | @@ -165,7 +172,14 @@ class PublicController extends RestBaseController | ||
165 | if($userId && $row){ | 172 | if($userId && $row){ |
166 | Db::commit(); | 173 | Db::commit(); |
167 | $token = cmf_generate_user_token($userId, 'wxapp'); | 174 | $token = cmf_generate_user_token($userId, 'wxapp'); |
168 | - $this->success("登录成功!", ['token' => $token]); | 175 | + $re=Db::name('user')->where('id',$userId)->find(); |
176 | + if (empty($re['mobile'])){ | ||
177 | + $this->success("请先手机号注册!", ['token' => $token]); | ||
178 | + } | ||
179 | + if ($re['status']!=1){ | ||
180 | + $this->success("请先填写用户信息!", ['token' => $token]); | ||
181 | + } | ||
182 | + $this->success("登陆成功!", ['token' => $token]); | ||
169 | }else{ | 183 | }else{ |
170 | Db::rollback(); | 184 | Db::rollback(); |
171 | $this->error(['code'=>'40004','msg'=>'登录失败']); | 185 | $this->error(['code'=>'40004','msg'=>'登录失败']); |
-
请 注册 或 登录 后发表评论