Authored by 沈志敏

Merge branch 'release/5.1' of git.yoho.cn:fe/yohobuywap-node into release/5.1

... ... @@ -59,7 +59,7 @@ const collectArticle = (req, res, next) => {
/* 判断用户是否登录 */
let id = req.body.id,
opt = req.body.opt || 'ok',
uid = req.user.uid;
uid = req.body.uid;
if (!stringProcess.isNumeric(id) || !stringProcess.isNumeric(uid)) {
res.json(result);
... ... @@ -106,7 +106,7 @@ const favoriteBrand = (req, res, next) => {
/* 判断参数是否有效 */
let id = req.body.id,
opt = req.body.opt || 'ok',
uid = req.user.uid || (req.body.uid && parseInt(crypto.decrypt(null, req.body.uid))) || req.cookies.appUid,
uid = req.body.uid || req.cookies.appUid,
isBrand = req.body.isBrand;
if (!stringProcess.isNumeric(id) || !stringProcess.isNumeric(uid)) {
... ...
... ... @@ -142,7 +142,7 @@ const index = (req, res, next) => {
}),
pageFooter: true,
search: {
defaultTerms: (result.defaultTerms.length !== 0) ? result.defaultTerms[0].content : '',
defaultTerms: (result.length && result.defaultTerms && result.defaultTerms.length !== 0) ? result.defaultTerms[0].content : '',
url: helpers.urlFormat('', null, 'search'),
hotTerms: result.hotTerms
}
... ...