...
|
...
|
@@ -5,6 +5,7 @@ |
|
|
*/
|
|
|
'use strict';
|
|
|
const serviceAPI = global.yoho.ServiceAPI;
|
|
|
const api = global.yoho.API;
|
|
|
const logger = global.yoho.logger;
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const guangProcess = require(`${global.utils}/guang-process`);
|
...
|
...
|
@@ -167,10 +168,13 @@ const getArticle = (param) => { |
|
|
_article(param)
|
|
|
]).then(result => {
|
|
|
|
|
|
let type = param.type;
|
|
|
|
|
|
let resu = {
|
|
|
guang: {
|
|
|
infos: [{
|
|
|
show: true,
|
|
|
swiper: [],
|
|
|
info: [{
|
|
|
'article_type': '1',
|
|
|
author: {
|
...
|
...
|
@@ -195,40 +199,54 @@ const getArticle = (param) => { |
|
|
'url': 'http://guang.m.yohobuy.com/info/index?id=34380'
|
|
|
},
|
|
|
img: 'https://img13.static.yhbimg.com/article/2016/09/05/14/02d732942cdd9647465736cb79796b0ddd.jpg?imageView/2/w/640/h/640',
|
|
|
'title': '验证逛文章图片压缩测试',
|
|
|
title: '11验证逛文章图片压缩测试',
|
|
|
'url': 'http://guang.m.yohobuy.com/info/index?id=34380',
|
|
|
pageView: '50'
|
|
|
}]
|
|
|
}],
|
|
|
navs: [{
|
|
|
typeId: '0',
|
|
|
type: '推荐',
|
|
|
focus: true
|
|
|
}, {
|
|
|
typeId: '1',
|
|
|
type: '话题'
|
|
|
}, {
|
|
|
typeId: '2',
|
|
|
type: '搭配'
|
|
|
}, {
|
|
|
typeId: '3',
|
|
|
type: '潮人'
|
|
|
}, {
|
|
|
typeId: '4',
|
|
|
type: '潮品'
|
|
|
}, {
|
|
|
typeId: '19',
|
|
|
type: '专题'
|
|
|
}],
|
|
|
swiper: [{
|
|
|
img: 'https://img11.static.yhbimg.com/yhb-img01/2016/09/01/10/017b5ce31285f9062469303ba9ca197660.jpg?imageView2/2/w/830/h/327',
|
|
|
url: 'http://feature.yoho.cn/0418RUNNINGMAN/index.html?title=兄弟在奔跑,潮流在有货&share_id=944'
|
|
|
}, {
|
|
|
img: 'https://img11.static.yhbimg.com/yhb-img01/2016/09/01/10/017b5ce31285f9062469303ba9ca197660.jpg?imageView2/2/w/830/h/327',
|
|
|
url: 'http://feature.yoho.cn/0418RUNNINGMAN/index.html?title=兄弟在奔跑,潮流在有货&share_id=944'
|
|
|
}]
|
|
|
navs: [],
|
|
|
swiper: true
|
|
|
}
|
|
|
};
|
|
|
|
|
|
if (result[0] && result[0].data) {
|
|
|
|
|
|
let nav = [];
|
|
|
|
|
|
let navList = result[0].data;
|
|
|
|
|
|
navList.forEach(na => {
|
|
|
nav.push({
|
|
|
typeId: na.id,
|
|
|
type: na.name,
|
|
|
focus: (na.id == type)
|
|
|
});
|
|
|
});
|
|
|
|
|
|
resu.guang.navs = nav;
|
|
|
|
|
|
// Object.assign(resu, [resu.guang.navs]);
|
|
|
}
|
|
|
|
|
|
if (result[1] && result[1].data) {
|
|
|
|
|
|
let swp = [];
|
|
|
|
|
|
let swiperList = result[1].data.list.adlist;
|
|
|
|
|
|
|
|
|
swiperList.forEach(sw => {
|
|
|
swp.push({
|
|
|
img: sw.src,
|
|
|
url: sw.url
|
|
|
});
|
|
|
});
|
|
|
|
|
|
resu.guang.infos.swiper = swp;
|
|
|
|
|
|
console.log(resu.guang.infos.swiper);
|
|
|
}
|
|
|
|
|
|
return resu;
|
|
|
});
|
|
|
|
...
|
...
|
|