Authored by 毕凯

Merge branch 'release/6.2' of git.yoho.cn:fe/yohobuywap-node into release/6.2

@@ -396,8 +396,10 @@ const wechat = { @@ -396,8 +396,10 @@ const wechat = {
396 } 396 }
397 let nickname = user._json.nickname || user.displayName; 397 let nickname = user._json.nickname || user.displayName;
398 let openId = user._json.unionid || user.id; 398 let openId = user._json.unionid || user.id;
  399 + let headImg = user._json.headimgurl || user.profileUrl;
399 400
400 - return res.status(302).redirect(`${redirectUrl}?openId=${openId}&nickname=${nickname}`); 401 + return res.status(302).redirect(
  402 + `${redirectUrl}?openId=${openId}&nickname=${nickname}&headImg=${encodeURIComponent(headImg)}`);
401 })(req, res, next); 403 })(req, res, next);
402 404
403 } 405 }
@@ -444,8 +446,10 @@ const sina = { @@ -444,8 +446,10 @@ const sina = {
444 } 446 }
445 let nickname = user.screen_name; 447 let nickname = user.screen_name;
446 let openId = user.id; 448 let openId = user.id;
  449 + let headImg = user._json.avatar_large || user.profile_image_url;
447 450
448 - return res.status(302).redirect(`${redirectUrl}?openId=${openId}&nickname=${nickname}`); 451 + return res.status(302).redirect(
  452 + `${redirectUrl}?openId=${openId}&nickname=${nickname}&headImg=${encodeURIComponent(headImg)}`);
449 })(req, res, next); 453 })(req, res, next);
450 } 454 }
451 }; 455 };