Authored by htoooth

fix bug

web: npm run dev
gulp: gulp --cwd=public
proxy: d:\dev\traefik\traefik.exe -c d:\dev\traefik\conf.toml
mem: d:\dev\memcached\memcached.exe
... ...
... ... @@ -11,7 +11,7 @@ const helpers = global.yoho.helpers;
const favoriteService = require('../models/favorite-service');
const index = (req, res, next)=> {
let uid = '8041246';
let uid = req.user.uid;
let udid = '8041246';
co(function*() {
... ... @@ -43,11 +43,7 @@ const index = (req, res, next)=> {
meFavoritePage: true,
meFavorite: data
});
})().then(next);
};
const reductionAction = ()=> {
})().catch(next);
};
module.exports = {
... ...
... ... @@ -58,9 +58,14 @@ const redutionCount = (uid)=> {
return api.get('', options);
};
const favoriteBrandData = () => {
return Promise.resolve();
};
module.exports = {
getUidProductFav,
getFavoriteProductList,
favoriteArticleData,
favoriteBrandData,
redutionCount
};
... ...
... ... @@ -258,6 +258,7 @@ const getSortInfo = (categoryList, sort)=> {
module.exports = {
getFavoriteTabs,
favoriteBrandList,
favoriteProductList,
favoriteArticleListAsync
};
... ...
... ... @@ -24,13 +24,13 @@ const personalController = require(`${cRoot}/qrcode`);
// const RedenvelopesController = require(`${cRoot}/Redenvelopes`);
// const VipController = require(`${cRoot}/vip`);
// const FavoriteController = require(`${cRoot}/Favorite`);
// const CouponsController = require(`${cRoot}/coupons`);
const UserController = require(`${cRoot}/user`);
const bindController = require(`${cRoot}/3party-bind`);
const AccountController = require(`${cRoot}/account`);
const favoriteController = require(`${cRoot}/favorite`);
// const AddressController = require(`${cRoot}/address`);
// const GiftController = require(`${cRoot}/gift`);
... ... @@ -208,8 +208,10 @@ router.get('/comment/order', [getCommonHeader, getHomeNav], commentController.co
/* 我的VIP*/
// router.get('/vip', VipController.index);
//
// router.get('/favorite', FavoriteController.index);
// 我的收藏
router.get('/favorite', [getCommonHeader, getHomeNav], favoriteController.index);
//
// router.get('/coupons', CouponsController.index);
... ...
<div class="me-favorite-page me-page yoho-page clearfix">
{{> path}}
{{> navigation}}
<div class="me-main">
{{# meFavorite}}
<div class="favorite block{{#if favProducts}} fav-products{{/if}}{{#if favBrands}} fav-brands{{/if}}{{#if favArticles}} fav-articles{{/if}}">
<h2 class="title"></h2>
{{> tabs}}
{{> favorite/product}}
{{# meFavorite}}
<div class="favorite block
{{#if favProducts}} fav-products{{/if}}
{{#if favBrands}} fav-brands{{/if}}
{{#if favArticles}} fav-articles{{/if}}">
{{> favorite/brand}}
<h2 class="title"></h2>
{{> tabs}}
{{> favorite/article}}
</div>
{{> favorite/product}}
{{> favorite/brand}}
{{> favorite/article}}
</div>
{{/meFavorite}}
{{> help-us}}
</div>
... ...