...
|
...
|
@@ -24,10 +24,12 @@ const signin = (type, area, profile, password, shoppingKey) => { |
|
|
return loginBy[type](area, profile, password, shoppingKey);
|
|
|
};
|
|
|
|
|
|
const syncUserSession = (uid, sessionKey, req, res) => {
|
|
|
cache.set(`java_session_key:${uid}`, sessionKey).catch(() => {
|
|
|
global.yoho.logger.error('write session key fail');
|
|
|
});
|
|
|
const syncUserSession = (uid, req, res, sessionKey) => {
|
|
|
if (sessionKey) {
|
|
|
cache.set(`java_session_key:${uid}`, sessionKey).catch(() => {
|
|
|
global.yoho.logger.error('write session key fail');
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return Promise.all([userService.profile(uid), cartService.goodsCount(uid)]).spread((userInfo, count) => {
|
|
|
let token = sign.makeToken(uid);
|
...
|
...
|
|