|
|
'use strict';
|
|
|
|
|
|
const serviceAPI = global.yoho.ServiceAPI;
|
|
|
// const serviceAPI = global.yoho.ServiceAPI;
|
|
|
const api = global.yoho.API;
|
|
|
const camelCase = global.yoho.camelCase;
|
|
|
const _ = require('lodash');
|
|
|
const logger = global.yoho.logger;
|
|
|
|
|
|
const _processListData = (list) => {
|
|
|
let category = {
|
|
|
key: '',
|
|
|
brands: []
|
|
|
};
|
|
|
// let category = {
|
|
|
// key: '',
|
|
|
// brands: []
|
|
|
// };
|
|
|
|
|
|
let listData = [];
|
|
|
|
|
|
list = list || [];
|
|
|
list = camelCase(list);
|
|
|
console.log(list)
|
|
|
console.log(list);
|
|
|
|
|
|
_.forEach(list.data.allList, function(value, index) {
|
|
|
|
...
|
...
|
@@ -39,7 +39,7 @@ const _processTabData = (list) => { |
|
|
list = list || [];
|
|
|
list = camelCase(list);
|
|
|
|
|
|
console.log(list)
|
|
|
console.log(list);
|
|
|
|
|
|
// let artList = list.list.artList.map(data =>{
|
|
|
// data.publishTime = data.publishTime.replace(/年|月/g, '/');
|
...
|
...
|
@@ -48,10 +48,10 @@ const _processTabData = (list) => { |
|
|
// return data;
|
|
|
// });
|
|
|
|
|
|
}
|
|
|
};
|
|
|
|
|
|
const _getResources = () => {
|
|
|
return api.get('', {
|
|
|
return api.get('', {
|
|
|
method: 'web.brand.series'
|
|
|
}).then((result) => {
|
|
|
if (result && result.code === 200) {
|
...
|
...
|
@@ -64,7 +64,7 @@ const _getResources = () => { |
|
|
};
|
|
|
|
|
|
const _getBreakingSort = () => {
|
|
|
return api.get('', {
|
|
|
return api.get('', {
|
|
|
method: 'app.brand.newBrandList'
|
|
|
}).then((result) => {
|
|
|
if (result && result.code === 200) {
|
...
|
...
|
|