Authored by zhangxiaoru

plustar

... ... @@ -114,7 +114,7 @@ const favoriteBrand = (req, res, next) => {
// 执行收藏或取消操作
return brandModel.favoriteBrand(uid, id, opt).then(data => {
console.log(data)
console.log(data);
if (!data) {
res.json({
code: 400,
... ...
... ... @@ -46,7 +46,7 @@ const collectArticle = (uid, id, opt) => {
}
};
//品牌收藏
// 品牌收藏
const favoriteBrand = (uid, id, opt) => {
... ... @@ -63,7 +63,7 @@ const favoriteBrand = (uid, id, opt) => {
type: 'brand'
};
}
if (opt === 'ok') {
return api.get('app.favorite.add', param);
... ...
... ... @@ -87,7 +87,7 @@ const getNewProduct = (brandId, gender, url) => {
}).then((result) => {
if (result && result.code === 200) {
//console.log(result.data.product_list)
// console.log(result.data.product_list)
// let naList = [];
let newArrival = {
naList: []
... ... @@ -96,7 +96,8 @@ const getNewProduct = (brandId, gender, url) => {
if (result.data.product_list) {
_.forEach(result.data.product_list, function(list, index) {
let obj = {};
let price
let price;
// console.log(list)
if (index <= 5) {
let tag = [];
... ... @@ -129,10 +130,10 @@ const getNewProduct = (brandId, gender, url) => {
});
if (list.market_price && list.market_price !== false) {
price = list.market_price + '.00'
console.log(price)
price = list.market_price + '.00';
console.log(price);
}
console.log(price)
console.log(price);
newArrival.moreUrl = url;
... ... @@ -148,7 +149,7 @@ const getNewProduct = (brandId, gender, url) => {
url: '/product/pro_' + list.product_id + '_' +
list.goods_list[0].goods_id + '/' + list.cn_alphabet + '.html',
tags: tag
})
});
if (price) {
obj = _.assign(obj, {
... ... @@ -162,7 +163,7 @@ const getNewProduct = (brandId, gender, url) => {
});
}
console.log(newArrival)
console.log(newArrival);
return newArrival;
} else {
logger.error('new data return code is not 200');
... ...
... ... @@ -38,7 +38,7 @@ router.get('/author/list', index.editor); // 编辑简介
router.get('/index/page', index.pageData); // 逛列表页面的资讯分页
router.post('/opt/praiseArticle', opt.praiseArticle); // 资讯文章点赞 (H5里显示点赞)
router.post('/opt/favoriteBrand', opt.favoriteBrand); // 品牌收藏
router.post('/opt/favoriteBrand', opt.favoriteBrand); // 品牌收藏
router.get('/info/index', info.index); // 逛详情页
router.get('/info/mini', info.mini); // 逛mini内容页
... ...