Authored by zzzzzzz

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

@@ -10,6 +10,7 @@ const favoriteModel = require('../models/favorite'); @@ -10,6 +10,7 @@ const favoriteModel = require('../models/favorite');
10 const headerModel = require('../../../doraemon/models/header'); // 头部model 10 const headerModel = require('../../../doraemon/models/header'); // 头部model
11 11
12 const favorite = (req, res) => { 12 const favorite = (req, res) => {
  13 + let tab = req.query.tab || '';
13 14
14 res.render('favorite', { 15 res.render('favorite', {
15 module: 'home', 16 module: 'home',
@@ -21,13 +22,14 @@ const favorite = (req, res) => { @@ -21,13 +22,14 @@ const favorite = (req, res) => {
21 pageFooter: true, 22 pageFooter: true,
22 favorite: { 23 favorite: {
23 productUrl: '//m.yohobuy.com/product/new', 24 productUrl: '//m.yohobuy.com/product/new',
24 - brandUrl: '//m.yohobuy.com/product/new' 25 + brandUrl: '//m.yohobuy.com/product/new',
  26 + brandTab: tab === 'brand' ? true : false // 是否为品牌收藏页
25 } 27 }
26 }); 28 });
27 }; 29 };
28 30
29 let favProduct = (req, res, next) => { 31 let favProduct = (req, res, next) => {
30 - let uid = req.user.uid; 32 + let uid = req.user.uid || 12696231;
31 let page = req.query.page || 1; 33 let page = req.query.page || 1;
32 let limit = 10; 34 let limit = 10;
33 35
@@ -44,7 +46,7 @@ let favProduct = (req, res, next) => { @@ -44,7 +46,7 @@ let favProduct = (req, res, next) => {
44 }; 46 };
45 47
46 let favfavBrand = (req, res, next) => { 48 let favfavBrand = (req, res, next) => {
47 - let uid = req.user.uid; 49 + let uid = req.user.uid || 12696231;
48 let page = req.query.page || 1; 50 let page = req.query.page || 1;
49 let limit = 10; 51 let limit = 10;
50 52
@@ -63,7 +65,7 @@ let favfavBrand = (req, res, next) => { @@ -63,7 +65,7 @@ let favfavBrand = (req, res, next) => {
63 }; 65 };
64 66
65 let favoriteDelete = (req, res, next) => { 67 let favoriteDelete = (req, res, next) => {
66 - let uid = req.user.uid; 68 + let uid = req.user.uid || 12696231;
67 let type = 'product'; 69 let type = 'product';
68 let favId = req.body.id; 70 let favId = req.body.id;
69 71