...
|
...
|
@@ -11,9 +11,8 @@ class Auth { |
|
|
let param = {
|
|
|
nickname: nickname,
|
|
|
openId: openId,
|
|
|
source_type: sourceType, // esline-disable-line
|
|
|
method: 'app.passport.signinByOpenID',
|
|
|
shoppingKey: shoppingKey
|
|
|
source_type: sourceType,
|
|
|
method: 'app.passport.signinByOpenID'
|
|
|
};
|
|
|
|
|
|
if (shoppingKey) {
|
...
|
...
|
@@ -25,12 +24,11 @@ class Auth { |
|
|
|
|
|
static signinByWechat(nickname, openId, unionId, sourceType, shoppingKey) {
|
|
|
let param = {
|
|
|
// nickname: nickname,
|
|
|
nickname: nickname,
|
|
|
openId: openId,
|
|
|
unionId: unionId,
|
|
|
source_type: sourceType,
|
|
|
method: 'app.passport.signinByWechat',
|
|
|
shoppingKey: shoppingKey
|
|
|
method: 'app.passport.signinByWechat'
|
|
|
};
|
|
|
|
|
|
if (shoppingKey) {
|
...
|
...
|
@@ -61,12 +59,12 @@ class Auth { |
|
|
domain: 'yohobuy.com'
|
|
|
});
|
|
|
}
|
|
|
req.session._TOKEN = token; // esline-disable-line
|
|
|
req.session._LOGIN_UID = uid; // esline-disable-line
|
|
|
req.session._TOKEN = token;
|
|
|
req.session._LOGIN_UID = uid;
|
|
|
res.cookie('_TOKEN', token, {
|
|
|
domain: 'yohobuy.com'
|
|
|
}); // esline-disable-line
|
|
|
}).catch(console.log);
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|