Authored by zhangxiaoru

favorite

... ... @@ -10,6 +10,8 @@ const favoriteModel = require('../models/favorite');
const headerModel = require('../../../doraemon/models/header'); // 头部model
const favorite = (req, res) => {
let tab = req.query.tab || '';
console.log(tab)
res.render('favorite', {
module: 'home',
... ... @@ -21,13 +23,14 @@ const favorite = (req, res) => {
pageFooter: true,
favorite: {
productUrl: '//m.yohobuy.com/product/new',
brandUrl: '//m.yohobuy.com/product/new'
brandUrl: '//m.yohobuy.com/product/new',
brandTab: tab === 'brand' ? true : false // 是否为品牌收藏页
}
});
};
let favProduct = (req, res, next) => {
let uid = req.user.uid;
let uid = req.user.uid || 12696231;
let page = req.query.page || 1;
let limit = 10;
... ... @@ -44,7 +47,7 @@ let favProduct = (req, res, next) => {
};
let favfavBrand = (req, res, next) => {
let uid = req.user.uid;
let uid = req.user.uid || 12696231;
let page = req.query.page || 1;
let limit = 10;
... ... @@ -63,7 +66,7 @@ let favfavBrand = (req, res, next) => {
};
let favoriteDelete = (req, res, next) => {
let uid = req.user.uid;
let uid = req.user.uid || 12696231;
let type = 'product';
let favId = req.body.id;
... ...