Commit 177e4a61 authored by clone's avatar clone

登陆

parent 92e65e81
......@@ -44,6 +44,7 @@ class RegisterService
$user_info = $this->userModel->getUserByWhere($conditions, $fields);
$buyer_id = 0;
$buyer_nick = "";
$user_nick = "";
$sex = 0;
$id = 0;
......@@ -81,6 +82,7 @@ class RegisterService
$wxInfoArr = $this->wxInfoModel->getWxInfoByOpenId($wx_union_id, $field);
if (count($wxInfoArr) > 0) {
$buyer_id = $wxInfoArr[0]["id"];
$buyer_nick = $wxInfoArr[0]["buyer_nick"];
$user_nick = !empty($user_nick) ? $user_nick : $wxInfoArr[0]["buyer_nick"];
$sex = !empty($sex) ? $sex : $wxInfoArr[0]["sex"];
$other_pic = $wxInfoArr[0]["buyer_img"];
......@@ -112,6 +114,8 @@ class RegisterService
$AuthToken = $jwt->createToken($jwt_data);
$data["id"] = $id;
$data["buyer_id"] = $buyer_id;
$data["buyer_nick"] = $buyer_nick;
$data["user_nick"] = $user_nick;
$data["user_phone"] = $phone;
$data["user_pic"] = !empty($user_info[0]["user_pic"]) ? HEADERIMGURL . $user_info[0]["user_pic"] : $other_pic;
......@@ -146,8 +150,8 @@ class RegisterService
$userParams["first_login_time"] = date("Y-m-d H:i:s", time()); //记录第一次登录时间排除邀请注册
$push = new PushMessageService();
$content = '你邀请的客户'.$user_nick.'-'.$phone.'手机号成功下载登录App';
$push->pushMessageById($referrer_id,'邀请注册', $content);
$content = '你邀请的客户' . $user_nick . '-' . $phone . '手机号成功下载登录App';
$push->pushMessageById($referrer_id, '邀请注册', $content);
}
}
$userParams["buyer_id"] = $buyer_id;
......
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