Showing
5 changed files
with
9 additions
and
8 deletions
@@ -92,13 +92,13 @@ const _relatedInfo = (getOtherArticle, isApp) => { | @@ -92,13 +92,13 @@ const _relatedInfo = (getOtherArticle, isApp) => { | ||
92 | if (value.url.indexOf('guang.m.yohobuy.com') < 0) { | 92 | if (value.url.indexOf('guang.m.yohobuy.com') < 0) { |
93 | value.url = `${helpers.https(value.url)}?openby:yohobuy={"url":"${value.url}","islogin":"N"}}`; | 93 | value.url = `${helpers.https(value.url)}?openby:yohobuy={"url":"${value.url}","islogin":"N"}}`; |
94 | } else { | 94 | } else { |
95 | - value.url = `//m.yohobuy.com/guang/info/${value.id}.html?openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${value.id}"},"shareparam":{"id":"${value.id}"},"share":"/guang/api/v1/share/guang","id":${value.id},"type":1,"url":"http://m.yohobuy.com/guang/info/${value.id}.html","islogin":"N"}}`; | 95 | + value.url = `//m.yohobuy.com/guang/${value.id}.html?openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${value.id}"},"shareparam":{"id":"${value.id}"},"share":"/guang/api/v1/share/guang","id":${value.id},"type":1,"url":"http://m.yohobuy.com/guang/${value.id}.html","islogin":"N"}}`; |
96 | } | 96 | } |
97 | } else { | 97 | } else { |
98 | if (value.url.indexOf('guang.m.yohobuy.com') < 0) { | 98 | if (value.url.indexOf('guang.m.yohobuy.com') < 0) { |
99 | value.url = value.url; | 99 | value.url = value.url; |
100 | } else { | 100 | } else { |
101 | - value.url = `//m.yohobuy.com/guang/info/${value.id}.html`; | 101 | + value.url = `//m.yohobuy.com/guang/${value.id}.html`; |
102 | } | 102 | } |
103 | } | 103 | } |
104 | 104 | ||
@@ -312,7 +312,7 @@ const indexRedirect = (req, res, next) => { | @@ -312,7 +312,7 @@ const indexRedirect = (req, res, next) => { | ||
312 | let id = req.query.id; | 312 | let id = req.query.id; |
313 | 313 | ||
314 | if (id) { | 314 | if (id) { |
315 | - let redirectUrl = '/guang/info/'; | 315 | + let redirectUrl = '/guang/'; |
316 | 316 | ||
317 | if (req.yoho.channel !== req.cookies._Channel) { | 317 | if (req.yoho.channel !== req.cookies._Channel) { |
318 | redirectUrl += `${req.yoho.channel}-`; | 318 | redirectUrl += `${req.yoho.channel}-`; |
@@ -53,9 +53,9 @@ router.post('/opt/collectArticle', opt.collectArticle); // 资讯文章收藏 (H | @@ -53,9 +53,9 @@ router.post('/opt/collectArticle', opt.collectArticle); // 资讯文章收藏 (H | ||
53 | router.post('/opt/favoriteBrand', opt.favoriteBrand); // 品牌收藏 | 53 | router.post('/opt/favoriteBrand', opt.favoriteBrand); // 品牌收藏 |
54 | 54 | ||
55 | router.get('/info/index', rewrite.channel, detail.indexRedirect); // 逛详情页 | 55 | router.get('/info/index', rewrite.channel, detail.indexRedirect); // 逛详情页 |
56 | -router.get(/^\/info\/(.*?)\.html/, rewrite.resolve, mip, detail.index); // 逛详情页 SEO优化 | 56 | +router.get(/^\/info\/(.*?)\.html/, rewrite.resolve, mip, detail.indexRedirect); // 逛详情页 SEO优化 |
57 | 57 | ||
58 | -router.get('/:id.html', detail.index); // 逛详情页(兼容 PC 跳转过来的链接) | 58 | +router.get('/:id.html', mip, detail.index); // 逛详情页(兼容 PC 跳转过来的链接) |
59 | router.get('/info/mini', detail.mini); // 逛mini内容页 | 59 | router.get('/info/mini', detail.mini); // 逛mini内容页 |
60 | router.get('/info/foryoho', detail.foryoho); // 逛foryoho内容页 | 60 | router.get('/info/foryoho', detail.foryoho); // 逛foryoho内容页 |
61 | 61 |
@@ -16,5 +16,6 @@ const guang = require(`${cRoot}/guang`); | @@ -16,5 +16,6 @@ const guang = require(`${cRoot}/guang`); | ||
16 | router.use(mip); | 16 | router.use(mip); |
17 | 17 | ||
18 | router.get(/^\/guang\/info\/(.*?)\.html/, rewrite.resolve, guang.detailIndex); | 18 | router.get(/^\/guang\/info\/(.*?)\.html/, rewrite.resolve, guang.detailIndex); |
19 | +router.get(/^\/guang\/(.*?)\.html/, rewrite.resolve, guang.detailIndex); | ||
19 | 20 | ||
20 | module.exports = router; | 21 | module.exports = router; |
@@ -129,7 +129,7 @@ | @@ -129,7 +129,7 @@ | ||
129 | <div class="related-info"> | 129 | <div class="related-info"> |
130 | {{# relatedInfo}} | 130 | {{# relatedInfo}} |
131 | <div class="info-item"> | 131 | <div class="info-item"> |
132 | - <a data-type="mip" data-title="{{title}}" href="//m.yohobuy.com/mip/guang/info/{{id}}.html"> | 132 | + <a data-type="mip" data-title="{{title}}" href="//m.yohobuy.com/mip/guang/{{id}}.html"> |
133 | <div class="pic"> | 133 | <div class="pic"> |
134 | <mip-img class="pic-mip" width="117" height="73" src="{{thumb}}"> | 134 | <mip-img class="pic-mip" width="117" height="73" src="{{thumb}}"> |
135 | </mip-img> | 135 | </mip-img> |
@@ -95,13 +95,13 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, top) => { | @@ -95,13 +95,13 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, top) => { | ||
95 | if (articleData.url.indexOf('guang.m.yohobuy.com') < 0) { | 95 | if (articleData.url.indexOf('guang.m.yohobuy.com') < 0) { |
96 | result.url = `${helpers.https(articleData.url)}?openby:yohobuy={"url":"${articleData.url}","islogin":"N"}}`; | 96 | result.url = `${helpers.https(articleData.url)}?openby:yohobuy={"url":"${articleData.url}","islogin":"N"}}`; |
97 | } else { | 97 | } else { |
98 | - result.url = `//m.yohobuy.com/guang/info/${articleData.id}.html?openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${articleData.id}"},"shareparam":{"id":"${articleData.id}"},"share":"/guang/api/v1/share/guang","id":${articleData.id},"type":1,"url":"http://m.yohobuy.com/guang/info/${articleData.id}.html","islogin":"N"}}`; | 98 | + result.url = `//m.yohobuy.com/guang/${articleData.id}.html?openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${articleData.id}"},"shareparam":{"id":"${articleData.id}"},"share":"/guang/api/v1/share/guang","id":${articleData.id},"type":1,"url":"http://m.yohobuy.com/guang/${articleData.id}.html","islogin":"N"}}`; |
99 | } | 99 | } |
100 | } else { | 100 | } else { |
101 | if (articleData.url.indexOf('guang.m.yohobuy.com') < 0) { | 101 | if (articleData.url.indexOf('guang.m.yohobuy.com') < 0) { |
102 | result.url = articleData.url; | 102 | result.url = articleData.url; |
103 | } else { | 103 | } else { |
104 | - result.url = `//m.yohobuy.com/guang/info/${articleData.id}.html`; | 104 | + result.url = `//m.yohobuy.com/guang/${articleData.id}.html`; |
105 | } | 105 | } |
106 | } | 106 | } |
107 | 107 |
-
Please register or login to post a comment