...
|
...
|
@@ -134,11 +134,6 @@ const _getChannelResource = (params) => { |
|
|
cache: true
|
|
|
}).then(result => {
|
|
|
if (result && result.code === 200) {
|
|
|
for (let item of result.data.list) {
|
|
|
item.template_name === 'single_image' &&
|
|
|
item.data.length === 1 &&
|
|
|
(item.singleOne = true);
|
|
|
}
|
|
|
return resourcesProcess(result.data.list);
|
|
|
} else {
|
|
|
logger.error('index resouce is not 200');
|
...
|
...
|
@@ -183,17 +178,27 @@ const _getChannelList = () => { |
|
|
result.data.list = camelCase(result.data.list || []);
|
|
|
|
|
|
_.forEach(result.data.list, function(item) {
|
|
|
const channel = channelList[item.yhChannel - 1];
|
|
|
let id = _.toNumber(item.id);
|
|
|
const channel = channelList[id - 1];
|
|
|
|
|
|
if (channel) {
|
|
|
list.channelList.push(channel);
|
|
|
}
|
|
|
|
|
|
if (_.toNumber(item.yhChannel) === 5) {
|
|
|
if (id === 5) {
|
|
|
list.yohood.showYohood = true;
|
|
|
list.yohood.yohoodHref = 'http://www.yohood.cn';
|
|
|
}
|
|
|
|
|
|
if (id === 6) {
|
|
|
list.channelList.push({
|
|
|
href: item.url,
|
|
|
title: item.title || '双 11',
|
|
|
entitle: item.title
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return Object.keys(list).length ? list : channelList;
|
|
|
} else {
|
|
|
logger.error('channel select code is not 200');
|
...
|
...
|
|