Authored by zhangxiaoru

brand

... ... @@ -31,17 +31,17 @@ const index = (req, res) => {
{
url: '#',
name: '',
src: '//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg?imageView2/2/w/570/h/633'
src: '//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg'
},
{
url: '#',
name: '',
src: '//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg?imageView2/2/w/570/h/633'
src: '//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg'
},
{
url: '#',
name: '',
src: '//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg?imageView2/2/w/570/h/633'
src: '//img10.static.yhbimg.com/yhb-img01/2016/07/06/17/01932e57d2dcd5c74afeaffd2525da5834.jpg'
}
],
category: result.category
... ...
... ... @@ -42,13 +42,13 @@ const _processTabData = (list) => {
const _getResources = () => {
return api.get('', {
method: 'web.brand.series'
// method: 'web.brand.series'
}).then((result) => {
if (result && result.code === 200) {
return _processTabData(result.data);
} else {
logger.error('品牌页Tab数据返回 code 不是 200');
return {};
// logger.error('品牌页Tab数据返回 code 不是 200');
// return {};
}
});
};
... ...
... ... @@ -7,7 +7,8 @@ const _ = require('lodash');
// const moment = require('moment');
const logger = global.yoho.logger;
const helpers = global.yoho.helpers;
// const helpers = global.yoho.helpers;
const _processNavData = (list, type) => {
let formatData = [];
... ... @@ -33,13 +34,13 @@ const _processListData = (list) => {
// let data = moment('2016年06月02日 15:56', 'YYYY年MM月DD日 HH:mm').format('YYYY/MM/DD HH:mm');
let artList = list.list.artList.map(data =>{
let artList = list.list.artList.map(data => {
data.publishTime = data.publishTime.replace(/年|月/g, '/');
data.publishTime = data.publishTime.replace(/日/g, '');
return data;
});
console.log(artList)
return artList;
};
... ...