Commit f8c087c7 authored by jianghaiming's avatar jianghaiming

update:St

parent 036ebbc9
...@@ -56,6 +56,7 @@ class UserService ...@@ -56,6 +56,7 @@ class UserService
$openid = !empty($response['openid']) ? $response['openid'] : ''; $openid = !empty($response['openid']) ? $response['openid'] : '';
//} //}
$user = UserWechatBind::getRecord(['openid' => $openid]); $user = UserWechatBind::getRecord(['openid' => $openid]);
//如果系统不存在,用户信息,则注册新用户 //如果系统不存在,用户信息,则注册新用户
if (empty($user) && !empty($response)) { if (empty($user) && !empty($response)) {
...@@ -142,16 +143,15 @@ class UserService ...@@ -142,16 +143,15 @@ class UserService
"update_time" => date("Y-m-d H:i:s"), "update_time" => date("Y-m-d H:i:s"),
'user_id' => $userId, 'user_id' => $userId,
]; ];
$bindStatus = UserWechatBind::save($update,['wechat_id' => $userInfo['wechat_id']]); $bindStatus = UserWechatBind::save($update,['wechat_id' => $userInfo['wechat_id']]);
if (!$bindStatus) { if (!$phoneNumber) {
throw new UserException(['cus' => 8]); throw new UserException(['cus' => 8]);
} }
$userInfo['user_id'] = $userId; $userInfo['user_id'] = $userId;
$userInfo['phone'] = $phoneNumber; $userInfo['phone'] = $phoneNumber;
$userInfo['is_pop_up'] = 1; $userInfo['is_pop_up'] = 1;
$userInfo['pop_up_text'] = "你不是老用户"; $userInfo['pop_up_text'] = "";
return $userInfo; 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