Authored by 陈峰

Merge branch 'feature/session' into 'release/5.5.1'

req.user.uid不能parseInt



See merge request !423
... ... @@ -11,7 +11,7 @@ const title = 'YOHO!BUY有货年度潮流账单——快来看看你的潮流形
const index = (req, res, next) => {
let isApp = req.query.app_version || req.query.appVersion ? true : false;
let shareUrl = false;
let uid = +req.query.uid || +req.user.uid;
let uid = +req.query.uid || req.user.uid;
let curUrl = 'http://m.yohobuy.com/activity/annual-account';
if (!uid) {
... ...
... ... @@ -18,7 +18,7 @@ function humanNum_wan(num) {
exports.beforeIn = (req, res, next) => {
// 将APP登录状态正常化
if (req.yoho.isApp) {
req.user.uid = Number(req.user.uid || req.query.uid);
req.user.uid = req.user.uid || Number(req.query.uid);
}
// 未登录
... ...
... ... @@ -27,7 +27,7 @@ exports.checkIsStudent = (req, res, next) => {
exports.beforeIn = (req, res, next) => {
// 将APP登录状态正常化
if (req.yoho.isApp) {
req.user.uid = Number(req.user.uid || req.query.uid);
req.user.uid = req.user.uid || Number(req.query.uid);
}
// 未登录
... ...
... ... @@ -153,7 +153,7 @@ const getDetailDataAsync = (req, res, next) => {
uid = parseInt(req.body.uid, 10);
}
} else {
uid = parseInt(req.user.uid, 10);
uid = req.user.uid;
}
if (!brandId) {
... ...
... ... @@ -13,8 +13,8 @@ const domains = {
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
... ...