...
|
...
|
@@ -133,6 +133,13 @@ class PublicController extends RestBaseController |
|
|
->where('openid', $openid)
|
|
|
->where('app_id', $appId)
|
|
|
->update($userData);
|
|
|
$re=Db::name('user')->where('id',$findThirdPartyUser['user_id'])->find();
|
|
|
if (empty($re['mobile'])){
|
|
|
$this->success("请先手机号注册!", ['token' => $token]);
|
|
|
}
|
|
|
if ($re['status']!=1){
|
|
|
$this->success("请先填写用户信息!", ['token' => $token]);
|
|
|
}
|
|
|
$this->success("登录成功!", ['token' => $token]);
|
|
|
} else {
|
|
|
|
...
|
...
|
@@ -165,7 +172,14 @@ class PublicController extends RestBaseController |
|
|
if($userId && $row){
|
|
|
Db::commit();
|
|
|
$token = cmf_generate_user_token($userId, 'wxapp');
|
|
|
$this->success("登录成功!", ['token' => $token]);
|
|
|
$re=Db::name('user')->where('id',$userId)->find();
|
|
|
if (empty($re['mobile'])){
|
|
|
$this->success("请先手机号注册!", ['token' => $token]);
|
|
|
}
|
|
|
if ($re['status']!=1){
|
|
|
$this->success("请先填写用户信息!", ['token' => $token]);
|
|
|
}
|
|
|
$this->success("登陆成功!", ['token' => $token]);
|
|
|
}else{
|
|
|
Db::rollback();
|
|
|
$this->error(['code'=>'40004','msg'=>'登录失败']);
|
...
|
...
|
|