|
@@ -4,7 +4,7 @@ |
|
@@ -4,7 +4,7 @@ |
4
|
|
4
|
|
5
|
'use strict';
|
5
|
'use strict';
|
6
|
|
6
|
|
7
|
-const _ = require('lodash');
|
7
|
+//const _ = require('lodash');
|
8
|
|
8
|
|
9
|
const helpers = global.yoho.helpers;
|
9
|
const helpers = global.yoho.helpers;
|
10
|
const TYPE = require('../type');
|
10
|
const TYPE = require('../type');
|
|
@@ -32,26 +32,14 @@ module.exports = [ |
|
@@ -32,26 +32,14 @@ module.exports = [ |
32
|
|
32
|
|
33
|
{
|
33
|
{
|
34
|
type: TYPE.redirect,
|
34
|
type: TYPE.redirect,
|
35
|
- origin: '/brands?gender=1,3&channel=boys',
|
|
|
36
|
- target: 'http://www.yohobuy.com/boys-brands/'
|
|
|
37
|
- },
|
|
|
38
|
-
|
|
|
39
|
- {
|
|
|
40
|
- type: TYPE.redirect,
|
|
|
41
|
- origin: '/brands?gender=2,3&channel=girls',
|
|
|
42
|
- target: 'http://www.yohobuy.com/girls-brands/'
|
|
|
43
|
- },
|
|
|
44
|
-
|
|
|
45
|
- {
|
|
|
46
|
- type: TYPE.redirect,
|
|
|
47
|
- origin: '/brands?msort=365&channel=kids',
|
|
|
48
|
- target: 'http://www.yohobuy.com/kids-brands/'
|
|
|
49
|
- },
|
|
|
50
|
-
|
|
|
51
|
- {
|
|
|
52
|
- type: TYPE.redirect,
|
|
|
53
|
- origin: '/brands?channel=lifestyle',
|
|
|
54
|
- target: 'http://www.yohobuy.com/lifestyle-brands/'
|
35
|
+ origin: /\/brands\?.*channel=(boys|girls|kids|lifestyle)/,
|
|
|
36
|
+ target: (req) => {
|
|
|
37
|
+ return helpers.urlFormat(
|
|
|
38
|
+ `/${req.query.channel}-brands/`,
|
|
|
39
|
+ null,
|
|
|
40
|
+ 'www'
|
|
|
41
|
+ );
|
|
|
42
|
+ }
|
55
|
},
|
43
|
},
|
56
|
|
44
|
|
57
|
{
|
45
|
{
|