Showing
3 changed files
with
14 additions
and
13 deletions
@@ -32,7 +32,7 @@ exports.index = (req, res, next) => { | @@ -32,7 +32,7 @@ exports.index = (req, res, next) => { | ||
32 | 32 | ||
33 | return res.render('hot', Object.assign({ | 33 | return res.render('hot', Object.assign({ |
34 | css: yield css('chanpin.css'), | 34 | css: yield css('chanpin.css'), |
35 | - title: `${goodsList.name}价格_图片_品牌_怎么样-YOHO!BUY有货`, | 35 | + title: `${goodsList.name}_${goodsList.name}【图片,新款,价格,折扣,搭配】-YOHO!BUY有货`, |
36 | mipUrl: `https://m.yohobuy.com${req.originalUrl}`, | 36 | mipUrl: `https://m.yohobuy.com${req.originalUrl}`, |
37 | mipFooter: true, | 37 | mipFooter: true, |
38 | canonical: { | 38 | canonical: { |
@@ -54,25 +54,25 @@ module.exports = class extends global.yoho.BaseModel { | @@ -54,25 +54,25 @@ module.exports = class extends global.yoho.BaseModel { | ||
54 | result.data.shopId = _.get(result, 'data.shop_id', null); | 54 | result.data.shopId = _.get(result, 'data.shop_id', null); |
55 | 55 | ||
56 | let finalResult = detailProcess.prodessDetailData(result.data); | 56 | let finalResult = detailProcess.prodessDetailData(result.data); |
57 | - let smallSort = _.get(result, 'data.smallSortId'); | 57 | + let midSort = _.get(result, 'data.middleSortId'); |
58 | 58 | ||
59 | - if (!smallSort) { | 59 | + if (!midSort) { |
60 | return finalResult; | 60 | return finalResult; |
61 | } | 61 | } |
62 | 62 | ||
63 | - return this.getRecomdKeywords(smallSort).then(res => { | 63 | + return this.getRecomdKeywords(midSort).then(res => { |
64 | let recomdKeywords = []; | 64 | let recomdKeywords = []; |
65 | 65 | ||
66 | try { | 66 | try { |
67 | res = res ? JSON.parse(res) : []; | 67 | res = res ? JSON.parse(res) : []; |
68 | } catch (e) { | 68 | } catch (e) { |
69 | - logger.error(`smallSort: ${smallSort}, message: ${e.message}`); | 69 | + logger.error(`middleSort: ${midSort}, message: ${e.message}`); |
70 | res = []; | 70 | res = []; |
71 | } | 71 | } |
72 | 72 | ||
73 | _.forEach(_.slice(_.shuffle(res), 0, 12), val => { | 73 | _.forEach(_.slice(_.shuffle(res), 0, 12), val => { |
74 | recomdKeywords.push({ | 74 | recomdKeywords.push({ |
75 | - url: helpers.urlFormat(`/chanpin/${val.id}.html`), | 75 | + url: helpers.urlFormat(`/mip/hot/${val.id}.html`), |
76 | keyword: val.keyword | 76 | keyword: val.keyword |
77 | }); | 77 | }); |
78 | }); | 78 | }); |
@@ -86,8 +86,8 @@ module.exports = class extends global.yoho.BaseModel { | @@ -86,8 +86,8 @@ module.exports = class extends global.yoho.BaseModel { | ||
86 | }); | 86 | }); |
87 | } | 87 | } |
88 | 88 | ||
89 | - getRecomdKeywords(smallSort) { | ||
90 | - return redis.all([['get', `global:yoho:seo:keywords:sortId:${smallSort}:page:1`]]).then(res => { | 89 | + getRecomdKeywords(midSort) { |
90 | + return redis.all([['get', `global:yoho:seo:hot:keywords:${midSort}:page:1`]]).then(res => { | ||
91 | return res[0]; | 91 | return res[0]; |
92 | }); | 92 | }); |
93 | } | 93 | } |
@@ -24,11 +24,10 @@ const domains = { | @@ -24,11 +24,10 @@ const domains = { | ||
24 | 24 | ||
25 | // platformApi: 'http://172.16.6.210:8088/', | 25 | // platformApi: 'http://172.16.6.210:8088/', |
26 | 26 | ||
27 | - | ||
28 | - api: 'http://api-test3.yohops.com:9999/', | ||
29 | - service: 'http://service-test3.yohops.com:9999/', | 27 | + api: 'http://api-test3.dev.yohocorp.com/', |
28 | + service: 'http://api-test3.dev.yohocorp.com/', | ||
30 | liveApi: 'http://testapi.live.yohops.com:9999/', | 29 | liveApi: 'http://testapi.live.yohops.com:9999/', |
31 | - singleApi: 'http://api-test3.yohops.com:9999/', | 30 | + singleApi: 'http://api-test3.dev.yohocorp.com/', |
32 | 31 | ||
33 | imSocket: 'ws://socket.yohobuy.com:10240', | 32 | imSocket: 'ws://socket.yohobuy.com:10240', |
34 | imCs: 'http://im.yohobuy.com/api', | 33 | imCs: 'http://im.yohobuy.com/api', |
@@ -135,7 +134,9 @@ module.exports = { | @@ -135,7 +134,9 @@ module.exports = { | ||
135 | jsSdk: '//cdn.yoho.cn/js-sdk/1.3.1/jssdk.js', | 134 | jsSdk: '//cdn.yoho.cn/js-sdk/1.3.1/jssdk.js', |
136 | redis: { | 135 | redis: { |
137 | connect: { | 136 | connect: { |
138 | - host: '127.0.0.1', | 137 | + host: '192.168.102.49', |
138 | + | ||
139 | + // host: '127.0.0.1', | ||
139 | port: '6379', | 140 | port: '6379', |
140 | password: '', | 141 | password: '', |
141 | enable_offline_queue: false, | 142 | enable_offline_queue: false, |
-
Please register or login to post a comment