1
|
'use strict';
|
1
|
'use strict';
|
2
|
|
2
|
|
3
|
-const serviceAPI = global.yoho.ServiceAPI;
|
3
|
+// const serviceAPI = global.yoho.ServiceAPI;
|
4
|
const api = global.yoho.API;
|
4
|
const api = global.yoho.API;
|
5
|
const camelCase = global.yoho.camelCase;
|
5
|
const camelCase = global.yoho.camelCase;
|
6
|
const _ = require('lodash');
|
6
|
const _ = require('lodash');
|
7
|
const logger = global.yoho.logger;
|
7
|
const logger = global.yoho.logger;
|
8
|
|
8
|
|
9
|
const _processListData = (list) => {
|
9
|
const _processListData = (list) => {
|
10
|
- let category = {
|
|
|
11
|
- key: '',
|
|
|
12
|
- brands: []
|
|
|
13
|
- };
|
10
|
+ // let category = {
|
|
|
11
|
+ // key: '',
|
|
|
12
|
+ // brands: []
|
|
|
13
|
+ // };
|
14
|
|
14
|
|
15
|
let listData = [];
|
15
|
let listData = [];
|
16
|
|
16
|
|
17
|
list = list || [];
|
17
|
list = list || [];
|
18
|
list = camelCase(list);
|
18
|
list = camelCase(list);
|
19
|
- console.log(list)
|
19
|
+ console.log(list);
|
20
|
|
20
|
|
21
|
_.forEach(list.data.allList, function(value, index) {
|
21
|
_.forEach(list.data.allList, function(value, index) {
|
22
|
|
22
|
|
|
@@ -39,7 +39,7 @@ const _processTabData = (list) => { |
|
@@ -39,7 +39,7 @@ const _processTabData = (list) => { |
39
|
list = list || [];
|
39
|
list = list || [];
|
40
|
list = camelCase(list);
|
40
|
list = camelCase(list);
|
41
|
|
41
|
|
42
|
- console.log(list)
|
42
|
+ console.log(list);
|
43
|
|
43
|
|
44
|
// let artList = list.list.artList.map(data =>{
|
44
|
// let artList = list.list.artList.map(data =>{
|
45
|
// data.publishTime = data.publishTime.replace(/年|月/g, '/');
|
45
|
// data.publishTime = data.publishTime.replace(/年|月/g, '/');
|
|
@@ -48,10 +48,10 @@ const _processTabData = (list) => { |
|
@@ -48,10 +48,10 @@ const _processTabData = (list) => { |
48
|
// return data;
|
48
|
// return data;
|
49
|
// });
|
49
|
// });
|
50
|
|
50
|
|
51
|
-}
|
51
|
+};
|
52
|
|
52
|
|
53
|
const _getResources = () => {
|
53
|
const _getResources = () => {
|
54
|
- return api.get('', {
|
54
|
+ return api.get('', {
|
55
|
method: 'web.brand.series'
|
55
|
method: 'web.brand.series'
|
56
|
}).then((result) => {
|
56
|
}).then((result) => {
|
57
|
if (result && result.code === 200) {
|
57
|
if (result && result.code === 200) {
|
|
@@ -64,7 +64,7 @@ const _getResources = () => { |
|
@@ -64,7 +64,7 @@ const _getResources = () => { |
64
|
};
|
64
|
};
|
65
|
|
65
|
|
66
|
const _getBreakingSort = () => {
|
66
|
const _getBreakingSort = () => {
|
67
|
- return api.get('', {
|
67
|
+ return api.get('', {
|
68
|
method: 'app.brand.newBrandList'
|
68
|
method: 'app.brand.newBrandList'
|
69
|
}).then((result) => {
|
69
|
}).then((result) => {
|
70
|
if (result && result.code === 200) {
|
70
|
if (result && result.code === 200) {
|