...
|
...
|
@@ -5,13 +5,15 @@ |
|
|
|
|
|
const TYPE = require('../type');
|
|
|
|
|
|
const MOBILE_DOMAIN = '//item.m.yohobuy.com';
|
|
|
|
|
|
module.exports = [
|
|
|
// 商品详情页老链接
|
|
|
{
|
|
|
type: TYPE.redirect,
|
|
|
origin: /^\/product\/pro_([\d]+)_([\d]+)\/(.*).html(.*)/,
|
|
|
target: (req, match, p1, p2, p3, p4) => {
|
|
|
req.mobileUrl = `/product/pro_${p1}_1/1.html${p4}`;
|
|
|
req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p4}`;
|
|
|
return `/p${p1}.html${p4}`;
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -21,7 +23,7 @@ module.exports = [ |
|
|
type: TYPE.rewrite,
|
|
|
origin: /^\/p([\d]+).html(.*)/,
|
|
|
target: (req, match, p1, p2) => {
|
|
|
req.mobileUrl = `/product/pro_${p1}_1/1.html${p2}`;
|
|
|
req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p2}`;
|
|
|
return `/product${req.url}`;
|
|
|
}
|
|
|
}
|
...
|
...
|
|