...
|
...
|
@@ -10,6 +10,7 @@ const favoriteModel = require('../models/favorite'); |
|
|
const headerModel = require('../../../doraemon/models/header'); // 头部model
|
|
|
|
|
|
const favorite = (req, res) => {
|
|
|
let tab = req.query.tab || '';
|
|
|
|
|
|
res.render('favorite', {
|
|
|
module: 'home',
|
...
|
...
|
@@ -21,13 +22,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 +46,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 +65,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;
|
|
|
|
...
|
...
|
|