Showing
2 changed files
with
16 additions
and
11 deletions
@@ -129,7 +129,7 @@ class featureModel extends global.yoho.BaseModel { | @@ -129,7 +129,7 @@ class featureModel extends global.yoho.BaseModel { | ||
129 | /** | 129 | /** |
130 | * 拼团商品列表 | 130 | * 拼团商品列表 |
131 | */ | 131 | */ |
132 | - _getCollageProductList(collageInfo, ctx) { // eslint-disable-line | 132 | + _getCollageProductList(collageInfo) { |
133 | let activityId = collageInfo.collageActivityId; | 133 | let activityId = collageInfo.collageActivityId; |
134 | 134 | ||
135 | if (!activityId) { | 135 | if (!activityId) { |
@@ -152,13 +152,9 @@ class featureModel extends global.yoho.BaseModel { | @@ -152,13 +152,9 @@ class featureModel extends global.yoho.BaseModel { | ||
152 | 152 | ||
153 | let replaceKey = '__skn__'; | 153 | let replaceKey = '__skn__'; |
154 | let replaceReg = new RegExp(replaceKey, 'g'); | 154 | let replaceReg = new RegExp(replaceKey, 'g'); |
155 | - let productUrl = `//m.yohobuy.com/product/${replaceKey}.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${replaceKey}","activity_id":"${activityId}","activity_type":"groupPurchase"}}`; // eslint-disable-line | 155 | + let productUrl = `//m.yohobuy.com/product/${replaceKey}.html?type=groupPurchase&&skn=${replaceKey}&&activity_id=${activityId}&&openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${replaceKey}","activity_id":"${activityId}","activity_type":"groupPurchase"}}`; // eslint-disable-line |
156 | let defaultPros = _.get(result, 'data.collageProductVoList', []); | 156 | let defaultPros = _.get(result, 'data.collageProductVoList', []); |
157 | 157 | ||
158 | - // if (!ctx.req.yoho.isApp) { | ||
159 | - // productUrl = 'javascript:;'; // eslint-disable-line | ||
160 | - // } | ||
161 | - | ||
162 | defaultPros.forEach(val => { | 158 | defaultPros.forEach(val => { |
163 | val.producturl = productUrl.replace(replaceReg, val.productSkn); | 159 | val.producturl = productUrl.replace(replaceReg, val.productSkn); |
164 | }); | 160 | }); |
@@ -62,6 +62,18 @@ const newDetail = { | @@ -62,6 +62,18 @@ const newDetail = { | ||
62 | let description = result.goodsName + ' 有货网仅售' + result.goodsPrice.currentPrice + '元,购买' + | 62 | let description = result.goodsName + ' 有货网仅售' + result.goodsPrice.currentPrice + '元,购买' + |
63 | result.brandName + result.sortName + ',了解' + result.brandName + result.sortName + '商品信息就上有货网!'; | 63 | result.brandName + result.sortName + ',了解' + result.brandName + result.sortName + '商品信息就上有货网!'; |
64 | 64 | ||
65 | + let miniAppParams = { | ||
66 | + productSkn: result.productSkn, | ||
67 | + union_type: req.query.union_type || req.cookies.unionTypeYas || '', | ||
68 | + }; | ||
69 | + let miniQrType: 7; | ||
70 | + | ||
71 | + // 拼团展示拼团小程序码 | ||
72 | + if (req.query.type === 'groupPurchase') { | ||
73 | + miniQrType = 17; | ||
74 | + miniAppParams.activityId = req.query.activity_id || ''; | ||
75 | + } | ||
76 | + | ||
65 | res.render('detail/new/detail', { | 77 | res.render('detail/new/detail', { |
66 | pageHeader: headerData, | 78 | pageHeader: headerData, |
67 | result: result, | 79 | result: result, |
@@ -79,11 +91,8 @@ const newDetail = { | @@ -79,11 +91,8 @@ const newDetail = { | ||
79 | isMarsApp: req.yoho.isMarsApp, // 判断mars | 91 | isMarsApp: req.yoho.isMarsApp, // 判断mars |
80 | miniPath: helpers.urlFormat('/api/wechat/miniapp.jpg', { | 92 | miniPath: helpers.urlFormat('/api/wechat/miniapp.jpg', { |
81 | miniapp_type: 0, | 93 | miniapp_type: 0, |
82 | - param: JSON.stringify({ | ||
83 | - productSkn: result.productSkn, | ||
84 | - union_type: req.query.union_type || req.cookies.unionTypeYas || '', | ||
85 | - }), | ||
86 | - miniQrType: 7, | 94 | + param: JSON.stringify(miniAppParams), |
95 | + miniQrType: miniQrType, | ||
87 | isOpen: _.get(req.app, 'locals.wap.wechat.miniPathOpen', false) | 96 | isOpen: _.get(req.app, 'locals.wap.wechat.miniPathOpen', false) |
88 | }), // param:品牌ID, name:品牌名称, miniQrType 7:商品 2 品牌,miniapp_type 0:有货,1:新与力,union_type商品详情页和默认页加 | 97 | }), // param:品牌ID, name:品牌名称, miniQrType 7:商品 2 品牌,miniapp_type 0:有货,1:新与力,union_type商品详情页和默认页加 |
89 | miphtml: `https://m.yohobuy.com/mip/product/${result.productSkn}.html`, | 98 | miphtml: `https://m.yohobuy.com/mip/product/${result.productSkn}.html`, |
-
Please register or login to post a comment