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

Merge remote-tracking branch 'origin/master'

@@ -94,6 +94,7 @@ class User extends Api @@ -94,6 +94,7 @@ class User extends Api
94 "time": "1553839125", 94 "time": "1553839125",
95 "data": { 95 "data": {
96 "token": "token",//登录唯一标识 96 "token": "token",//登录唯一标识
  97 + "avatar": "头像"
97 }, 98 },
98 }) 99 })
99 */ 100 */
@@ -160,7 +161,7 @@ class User extends Api @@ -160,7 +161,7 @@ class User extends Api
160 ->where('openid', $openid) 161 ->where('openid', $openid)
161 ->where('app_id', $appId) 162 ->where('app_id', $appId)
162 ->update($userData); 163 ->update($userData);
163 - $this->success("登录成功!", ['token' => $token]); 164 + $this->success("登录成功!", ['token' => $token, 'avatar' => $wxUserData['avatarUrl']]);
164 } else { 165 } else {
165 if(empty($data['inviter'])){ 166 if(empty($data['inviter'])){
166 $invite_id = ''; 167 $invite_id = '';
@@ -198,7 +199,7 @@ class User extends Api @@ -198,7 +199,7 @@ class User extends Api
198 if ($userId && $row) { 199 if ($userId && $row) {
199 Db::commit(); 200 Db::commit();
200 $token = generate_user_token($userId); 201 $token = generate_user_token($userId);
201 - $this->success("登录成功!", ['token' => $token]); 202 + $this->success("登录成功!", ['token' => $token, 'avatar' => $wxUserData['avatarUrl']]);
202 } else { 203 } else {
203 Db::rollback(); 204 Db::rollback();
204 $this->error('登录失败'); 205 $this->error('登录失败');