Commit faa0efb7 authored by jianghaiming's avatar jianghaiming

update:Set

parent 0674f903
......@@ -20,5 +20,6 @@ class UserException extends BaseException
6 => '解密失败 不存在',
7 => '手机号获取失败',
8 => '绑定手机号失败',
9 => '该手机号已绑定其他用户不能重复绑定',
];
}
\ No newline at end of file
......@@ -115,6 +115,9 @@ class UserService
throw new UserException(['cus' => 5]);
}
//解密
......@@ -136,6 +139,12 @@ class UserService
$phoneNumber = strval($decryptData['phoneNumber']);
//判断是否已
$user = UserWechatBind::getRecord(['phone' => $phoneNumber]);
if (!empty($user) && $openid != $user['openid']) {
throw new UserException(['cus' => 9]);
}
$jwUser = (new JwUser ())->getUserInfo(['mobile' => $phoneNumber]);
$userId = '';
if (!empty($jwUser['data'])) {
......@@ -155,7 +164,7 @@ class UserService
}
$userInfo['user_id'] = $userId;
$userInfo['phone'] = $phoneNumber;
$userInfo['is_pop_up'] = 1;
$userInfo['is_pop_up'] = !empty($user) ? 0 : 1;
$userInfo['pop_up_text'] = "";
return $userInfo;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment