|
@@ -6,9 +6,6 @@ |
|
@@ -6,9 +6,6 @@ |
6
|
'use strict';
|
6
|
'use strict';
|
7
|
const _ = require('lodash');
|
7
|
const _ = require('lodash');
|
8
|
|
8
|
|
9
|
-// const helpers = global.yoho.helpers;
|
|
|
10
|
-// const utils = require('../../../utils');
|
|
|
11
|
-
|
|
|
12
|
const genderMap = {
|
9
|
const genderMap = {
|
13
|
boys: '1,3',
|
10
|
boys: '1,3',
|
14
|
girls: '2,3',
|
11
|
girls: '2,3',
|
|
@@ -39,34 +36,17 @@ module.exports = class extends global.yoho.BaseModel { |
|
@@ -39,34 +36,17 @@ module.exports = class extends global.yoho.BaseModel { |
39
|
// 如果有二级菜单,二级菜单跳转,否则一级菜单跳转
|
36
|
// 如果有二级菜单,二级菜单跳转,否则一级菜单跳转
|
40
|
if (firstItem.sub && firstItem.sub.length) {
|
37
|
if (firstItem.sub && firstItem.sub.length) {
|
41
|
_.map(firstItem.sub, function(secondItem) {
|
38
|
_.map(firstItem.sub, function(secondItem) {
|
42
|
- // secondItem.url = helpers.urlFormat('/', utils.mapSort({
|
|
|
43
|
- // sort: _.get(secondItem, 'relation_parameter.sort'),
|
|
|
44
|
- // sort_name: secondItem.category_name,
|
|
|
45
|
- // gender: genderMap[key] || ''
|
|
|
46
|
- // }), 'list');
|
|
|
47
|
secondItem.url =
|
39
|
secondItem.url =
|
48
|
- `//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(secondItem, 'category_id')}`;
|
40
|
+ `//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(secondItem, 'category_id')}.html`;
|
49
|
});
|
41
|
});
|
50
|
|
42
|
|
51
|
firstItem.sub.unshift({
|
43
|
firstItem.sub.unshift({
|
52
|
category_name: `全部${firstItem.category_name}`,
|
44
|
category_name: `全部${firstItem.category_name}`,
|
53
|
-
|
|
|
54
|
- // url: helpers.urlFormat('/', utils.mapSort({
|
|
|
55
|
- // sort: _.get(firstItem, 'relation_parameter.sort'),
|
|
|
56
|
- // sort_name: firstItem.category_name,
|
|
|
57
|
- // gender: genderMap[key] || ''
|
|
|
58
|
- // }), 'list'),
|
|
|
59
|
- url: `//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(firstItem, 'category_id')}?title=${firstItem.category_name}` // eslint-disable-line
|
45
|
+ url: `//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(firstItem, 'category_id')}.html?title=${firstItem.category_name}` // eslint-disable-line
|
60
|
});
|
46
|
});
|
61
|
} else {
|
47
|
} else {
|
62
|
- // firstItem.url = helpers.urlFormat('/', utils.mapSort({
|
|
|
63
|
- // sort: _.get(firstItem, 'relation_parameter.sort'),
|
|
|
64
|
- // sort_name: firstItem.category_name,
|
|
|
65
|
- // gender: genderMap[key] || ''
|
|
|
66
|
- // }), 'list');
|
|
|
67
|
-
|
|
|
68
|
firstItem.url =
|
48
|
firstItem.url =
|
69
|
- `//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(firstItem, 'category_id')}`;
|
49
|
+ `//m.yohobuy.com/list/gd${genderMap[key] || ''}-ci${_.get(firstItem, 'category_id')}.html`;
|
70
|
}
|
50
|
}
|
71
|
});
|
51
|
});
|
72
|
});
|
52
|
});
|