Merge branch 'feature/seoUrl' into release/5.4.1
Showing
1 changed file
with
12 additions
and
12 deletions
@@ -25,9 +25,9 @@ module.exports = [ | @@ -25,9 +25,9 @@ module.exports = [ | ||
25 | { | 25 | { |
26 | type: TYPE.rewrite, | 26 | type: TYPE.rewrite, |
27 | origin: /^\/(boys|girls|kids|lifestyle)(\/*)$/, | 27 | origin: /^\/(boys|girls|kids|lifestyle)(\/*)$/, |
28 | - target: (req, match, p1) => { | ||
29 | - req.query.channel = p1; | ||
30 | - return `/guang/?chanel=${p1}`; | 28 | + target: (req, match, channel) => { |
29 | + req.query.channel = channel; | ||
30 | + return `/guang/?chanel=${channel}`; | ||
31 | } | 31 | } |
32 | }, | 32 | }, |
33 | 33 | ||
@@ -48,10 +48,10 @@ module.exports = [ | @@ -48,10 +48,10 @@ module.exports = [ | ||
48 | { | 48 | { |
49 | type: TYPE.rewrite, | 49 | type: TYPE.rewrite, |
50 | origin: /^\/(boys|girls|kids|lifestyle)-t([\d]+)(\/*)$/, | 50 | origin: /^\/(boys|girls|kids|lifestyle)-t([\d]+)(\/*)$/, |
51 | - target: (req, match, p1, p2) => { | ||
52 | - req.query.channel = p1; | ||
53 | - req.query.type = p2; | ||
54 | - return `/guang/?chanel=${p1}&type=${p2}`; | 51 | + target: (req, match, channel, type) => { |
52 | + req.query.channel = channel; | ||
53 | + req.query.type = type; | ||
54 | + return `/guang/?chanel=${channel}&type=${type}`; | ||
55 | } | 55 | } |
56 | }, | 56 | }, |
57 | 57 | ||
@@ -59,11 +59,11 @@ module.exports = [ | @@ -59,11 +59,11 @@ module.exports = [ | ||
59 | { | 59 | { |
60 | type: TYPE.rewrite, | 60 | type: TYPE.rewrite, |
61 | origin: /^\/(boys|girls|kids|lifestyle)-t([\d]+)-p([\d]+)(\/*)$/, | 61 | origin: /^\/(boys|girls|kids|lifestyle)-t([\d]+)-p([\d]+)(\/*)$/, |
62 | - target: (req, match, p1, p2, p3) => { | ||
63 | - req.query.channel = p1; | ||
64 | - req.query.type = p2; | ||
65 | - req.query.page = p3; | ||
66 | - return `/guang/index/index/?type=${p2}&channel=${p3}`; | 62 | + target: (req, match, channel, type, page) => { |
63 | + req.query.channel = channel; | ||
64 | + req.query.type = type; | ||
65 | + req.query.page = page; | ||
66 | + return `/guang/index/index/?type=${type}&channel=${page}`; | ||
67 | } | 67 | } |
68 | }, | 68 | }, |
69 | 69 |
-
Please register or login to post a comment