...
|
...
|
@@ -83,17 +83,17 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
let saltedToken = sign.makeToken(saltedUid);
|
|
|
let publicToken = saltedToken + salt;
|
|
|
|
|
|
let data = userInfo.data;
|
|
|
let data = userInfo.data || {};
|
|
|
|
|
|
if (!data) {
|
|
|
throw Error('app.passport.profile api error');
|
|
|
if (!userInfo.data) { // 个新信息接口可能限流,即使限流也仍然可以登录
|
|
|
logger.error(`app.passport.profile api error【${uid}】`);
|
|
|
}
|
|
|
|
|
|
let encryptionUid = aes.encryptionUid(data.uid);
|
|
|
let encryptionUid = aes.encryptionUid(uid);
|
|
|
|
|
|
|
|
|
let uidCookie =
|
|
|
`${encodeURIComponent(data.profile_name)}::${encryptionUid}::${_.get(data, 'vip_info.title', '')}::${saltedToken}`; // eslint-disable-line
|
|
|
`${encodeURIComponent(data.profile_name || '')}::${encryptionUid}::${_.get(data, 'vip_info.title', '')}::${saltedToken}`; // eslint-disable-line
|
|
|
let isStudent = _.get(data, 'vip_info.is_student') || 0;
|
|
|
|
|
|
res.cookie('_UID', uidCookie, {
|
...
|
...
|
|