Authored by 毕凯

Merge branch 'feature/coupons-expansion' into 'release/6.2'

第三方授权登录头像参数返回



See merge request !1003
... ... @@ -396,8 +396,10 @@ const wechat = {
}
let nickname = user._json.nickname || user.displayName;
let openId = user._json.unionid || user.id;
let headImg = user._json.headimgurl || user.profileUrl;
return res.status(302).redirect(`${redirectUrl}?openId=${openId}&nickname=${nickname}`);
return res.status(302).redirect(
`${redirectUrl}?openId=${openId}&nickname=${nickname}&headImg=${encodeURIComponent(headImg)}`);
})(req, res, next);
}
... ... @@ -444,8 +446,10 @@ const sina = {
}
let nickname = user.screen_name;
let openId = user.id;
let headImg = user._json.avatar_large || user.profile_image_url;
return res.status(302).redirect(`${redirectUrl}?openId=${openId}&nickname=${nickname}`);
return res.status(302).redirect(
`${redirectUrl}?openId=${openId}&nickname=${nickname}&headImg=${encodeURIComponent(headImg)}`);
})(req, res, next);
}
};
... ...