Authored by htoooth

fix

@@ -16,7 +16,7 @@ module.exports = [ @@ -16,7 +16,7 @@ module.exports = [
16 origin: /^\/product\/pro_([\d]+)_([\d]+)\/(.*).html(.*)/, 16 origin: /^\/product\/pro_([\d]+)_([\d]+)\/(.*).html(.*)/,
17 target: (req, match, p1, p2, p3, p4) => { 17 target: (req, match, p1, p2, p3, p4) => {
18 req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p4 ? p4 : ''}`; 18 req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p4 ? p4 : ''}`;
19 - return helpers.urlFormat(`/product/${p1}.html${p4}`, null, 'www'); 19 + return helpers.urlFormat(`/p${p1}.html${p4}`, null, 'item');
20 } 20 }
21 }, 21 },
22 22
@@ -24,7 +24,7 @@ module.exports = [ @@ -24,7 +24,7 @@ module.exports = [
24 { 24 {
25 type: TYPE.redirect, 25 type: TYPE.redirect,
26 origin: /^\/product\/pro_([\d]+)(.*)/, 26 origin: /^\/product\/pro_([\d]+)(.*)/,
27 - target: (req, match, p1, p2) => helpers.urlFormat(`/product/${p1}.html${p2 ? p2 : ''}`, null, 'www') 27 + target: (req, match, p1) => helpers.urlFormat(`/p${p1}.html`, null, 'item')
28 }, 28 },
29 29
30 // 商品详情页老链接 30 // 商品详情页老链接
@@ -33,7 +33,7 @@ module.exports = [ @@ -33,7 +33,7 @@ module.exports = [
33 origin: /^\/p([\d]+).html(.*)/, 33 origin: /^\/p([\d]+).html(.*)/,
34 target: (req, match, p1, p2) => { 34 target: (req, match, p1, p2) => {
35 req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p2 ? p2 : ''}`; 35 req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p2 ? p2 : ''}`;
36 - return helpers.urlFormat(`/product/${p1}.html${p2 ? p2 : ''}`, null, 'www'); 36 + return `/product${req.url}`;
37 } 37 }
38 }, 38 },
39 39