...
|
...
|
@@ -6,6 +6,10 @@ const cache = global.yoho.cache; |
|
|
const sign = global.yoho.sign;
|
|
|
const api = global.yoho.API;
|
|
|
|
|
|
const Promise = require('bluebird');
|
|
|
|
|
|
const cartApi = require('./cart-api');
|
|
|
|
|
|
const Auth = {
|
|
|
signin(type, area, profile, password, shoppingKey) {
|
|
|
let _that = this;
|
...
|
...
|
@@ -108,7 +112,7 @@ const Auth = { |
|
|
return api.get('', param);
|
|
|
},
|
|
|
syncUserSession(uid, req, res) {
|
|
|
return Auth.profile(uid).then((userInfo) => {
|
|
|
return Promise.all([Auth.profile(uid), cartApi.goodsCount(uid)]).spread((userInfo, count) => {
|
|
|
let token = sign.makeToken(uid);
|
|
|
let data = userInfo.data;
|
|
|
let encryptionUid = aes.encryptionUid(data.uid);
|
...
|
...
|
|