作者 Cool
1 个管道 的构建 通过 耗费 10 秒

Merge remote-tracking branch 'origin/master'

... ... @@ -94,6 +94,7 @@ class User extends Api
"time": "1553839125",
"data": {
"token": "token",//登录唯一标识
"avatar": "头像"
},
})
*/
... ... @@ -160,7 +161,7 @@ class User extends Api
->where('openid', $openid)
->where('app_id', $appId)
->update($userData);
$this->success("登录成功!", ['token' => $token]);
$this->success("登录成功!", ['token' => $token, 'avatar' => $wxUserData['avatarUrl']]);
} else {
if(empty($data['inviter'])){
$invite_id = '';
... ... @@ -198,7 +199,7 @@ class User extends Api
if ($userId && $row) {
Db::commit();
$token = generate_user_token($userId);
$this->success("登录成功!", ['token' => $token]);
$this->success("登录成功!", ['token' => $token, 'avatar' => $wxUserData['avatarUrl']]);
} else {
Db::rollback();
$this->error('登录失败');
... ...