Merge branch 'feature/package' into 'release/5.5'
Feature/package See merge request !373
Showing
8 changed files
with
40 additions
and
8 deletions
@@ -39,7 +39,7 @@ const detail = (params, isApp) => { | @@ -39,7 +39,7 @@ const detail = (params, isApp) => { | ||
39 | 39 | ||
40 | return { | 40 | return { |
41 | bundleDatas: _.map(result.data, (bundle, index) => { | 41 | bundleDatas: _.map(result.data, (bundle, index) => { |
42 | - let query = {skn: params.skn, index: index + 1}; | 42 | + let query = {bundle_skn: params.skn || params.bundle_skn, productId: params.productId, index: index + 1}; |
43 | 43 | ||
44 | if (isApp) { | 44 | if (isApp) { |
45 | query.app_version = isApp; | 45 | query.app_version = isApp; |
@@ -223,13 +223,13 @@ const tool = { | @@ -223,13 +223,13 @@ const tool = { | ||
223 | * @param skn | 223 | * @param skn |
224 | * @returns {{}} | 224 | * @returns {{}} |
225 | */ | 225 | */ |
226 | - processBundle(bundleData, skn, gid, index) { | 226 | + processBundle(bundleData, skn, productId, index) { |
227 | let subPrice = _.get(bundleData, 'bundleInfo.subPrice', 0); | 227 | let subPrice = _.get(bundleData, 'bundleInfo.subPrice', 0); |
228 | 228 | ||
229 | return { | 229 | return { |
230 | tabName: _.get(bundleData, 'bundleInfo.tabName') || '', | 230 | tabName: _.get(bundleData, 'bundleInfo.tabName') || '', |
231 | title: _.get(bundleData, 'bundleInfo.bundleName') || '优惠套装', | 231 | title: _.get(bundleData, 'bundleInfo.bundleName') || '优惠套装', |
232 | - href: helpers.urlFormat('/product/bundle/detail', {skn: skn, gid: gid, index: index}), | 232 | + href: helpers.urlFormat('/product/bundle/detail', {skn: skn, productId: productId, index: index}), |
233 | description: subPrice ? '立省¥' + subPrice : 0, | 233 | description: subPrice ? '立省¥' + subPrice : 0, |
234 | productList: productProcess.processProductList(bundleData && bundleData.productList) | 234 | productList: productProcess.processProductList(bundleData && bundleData.productList) |
235 | }; | 235 | }; |
@@ -297,7 +297,6 @@ const newDetail = { | @@ -297,7 +297,6 @@ const newDetail = { | ||
297 | let brandId = params.brandId; | 297 | let brandId = params.brandId; |
298 | let productId = params.productId; | 298 | let productId = params.productId; |
299 | let skn = params.skn; | 299 | let skn = params.skn; |
300 | - let gid = params.gid; | ||
301 | 300 | ||
302 | let apiArray = [ | 301 | let apiArray = [ |
303 | this.queryShopsByBrandId(brandId), // 0 品牌信息 | 302 | this.queryShopsByBrandId(brandId), // 0 品牌信息 |
@@ -338,7 +337,7 @@ const newDetail = { | @@ -338,7 +337,7 @@ const newDetail = { | ||
338 | tool.processDiscount(finalResult, _.find(bundleDatas, data => data.discountType === 2)); | 337 | tool.processDiscount(finalResult, _.find(bundleDatas, data => data.discountType === 2)); |
339 | } else { /* 套装 */ | 338 | } else { /* 套装 */ |
340 | finalResult.bundleDatas = _.map(bundleDatas, (data, index) => { | 339 | finalResult.bundleDatas = _.map(bundleDatas, (data, index) => { |
341 | - return tool.processBundle(data, skn, gid, ++index); | 340 | + return tool.processBundle(data, skn, productId, ++index); |
342 | }); | 341 | }); |
343 | } | 342 | } |
344 | 343 |
@@ -52,4 +52,5 @@ | @@ -52,4 +52,5 @@ | ||
52 | <input type="hidden" id="shareTitle" value="{{title}}"> | 52 | <input type="hidden" id="shareTitle" value="{{title}}"> |
53 | <input type="hidden" id="shareUrl" value="{{url}}"> | 53 | <input type="hidden" id="shareUrl" value="{{url}}"> |
54 | {{/shareInfo}} | 54 | {{/shareInfo}} |
55 | + <input type="hidden" id="no-download" value="1" > | ||
55 | </div> | 56 | </div> |
@@ -75,7 +75,8 @@ $('.goods-img').on('touchend', function() { | @@ -75,7 +75,8 @@ $('.goods-img').on('touchend', function() { | ||
75 | op: 'YB_GDS_PACKAGE_GOODS_C', | 75 | op: 'YB_GDS_PACKAGE_GOODS_C', |
76 | param: JSON.stringify({ | 76 | param: JSON.stringify({ |
77 | C_ID: window._ChannelVary[window.cookie('_Channel')], | 77 | C_ID: window._ChannelVary[window.cookie('_Channel')], |
78 | - PRD_ID: window.queryString.gid, | 78 | + PRD_ID: window.queryString.productId, |
79 | + TAB_ID: window.queryString.index || 1, | ||
79 | PACKAGE_GOODS: packGood.data('id'), | 80 | PACKAGE_GOODS: packGood.data('id'), |
80 | PACKAGE_INDEX: packGood.data('index') + 1 | 81 | PACKAGE_INDEX: packGood.data('index') + 1 |
81 | }) | 82 | }) |
@@ -90,6 +91,17 @@ $('.bundle-tabs').on('click', '.swiper-slide', (e) => { | @@ -90,6 +91,17 @@ $('.bundle-tabs').on('click', '.swiper-slide', (e) => { | ||
90 | if ($tab.hasClass('selected')) { | 91 | if ($tab.hasClass('selected')) { |
91 | return; | 92 | return; |
92 | } | 93 | } |
94 | + if (window._yas && window._yas.sendCustomInfo) { | ||
95 | + window._yas.sendCustomInfo({ | ||
96 | + op: 'YB_GDS_PACKAGE_TAB_C', | ||
97 | + param: JSON.stringify({ | ||
98 | + C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
99 | + PRD_ID: window.queryString.productId, | ||
100 | + TAB_ID: $(e.currentTarget).data('index') + 1, | ||
101 | + PACKAGE_DETAIL: 2 | ||
102 | + }) | ||
103 | + }, true); | ||
104 | + } | ||
93 | let href = $tab.data('href'); | 105 | let href = $tab.data('href'); |
94 | 106 | ||
95 | window.location.href = href; | 107 | window.location.href = href; |
@@ -133,7 +145,7 @@ $buyNowBtn.on('touchstart', function() { | @@ -133,7 +145,7 @@ $buyNowBtn.on('touchstart', function() { | ||
133 | op: 'YB_GDS_PACKAGE_BUY_NOW_C', | 145 | op: 'YB_GDS_PACKAGE_BUY_NOW_C', |
134 | param: JSON.stringify({ | 146 | param: JSON.stringify({ |
135 | C_ID: window._ChannelVary[window.cookie('_Channel')], | 147 | C_ID: window._ChannelVary[window.cookie('_Channel')], |
136 | - PRD_ID: window.queryString.id, | 148 | + PRD_ID: window.queryString.productId, |
137 | PACKAGE_GOODS: yasGid.join(',') | 149 | PACKAGE_GOODS: yasGid.join(',') |
138 | }) | 150 | }) |
139 | }, true); | 151 | }, true); |
@@ -146,6 +158,6 @@ $buyNowBtn.on('touchstart', function() { | @@ -146,6 +158,6 @@ $buyNowBtn.on('touchstart', function() { | ||
146 | activity_id: bundleId | 158 | activity_id: bundleId |
147 | }), actCkOpthn); | 159 | }), actCkOpthn); |
148 | 160 | ||
149 | - window.location.href = '/cart/index/new/orderEnsure?cartType=bundle&activityType=bundle'; | 161 | + window.location.href = '/cart/index/new/orderEnsure?cartType=bundle&activityType=bundle&productId=' + window.queryString.productId; |
150 | } | 162 | } |
151 | }); | 163 | }); |
@@ -55,8 +55,25 @@ let bundleObj = { | @@ -55,8 +55,25 @@ let bundleObj = { | ||
55 | $(e.currentTarget).addClass('selected').siblings().removeClass('selected'); | 55 | $(e.currentTarget).addClass('selected').siblings().removeClass('selected'); |
56 | self.bundleIndex = index; | 56 | self.bundleIndex = index; |
57 | self.renderProduct(); | 57 | self.renderProduct(); |
58 | + if (window._yas && window._yas.sendCustomInfo) { | ||
59 | + window._yas.sendCustomInfo({ | ||
60 | + op: 'YB_GDS_PACKAGE_TAB_C', | ||
61 | + param: JSON.stringify({ | ||
62 | + C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
63 | + PRD_ID: $('#productId').val(), | ||
64 | + TAB_ID: index + 1, | ||
65 | + PACKAGE_DETAIL: 1 | ||
66 | + }) | ||
67 | + }, true); | ||
68 | + } | ||
58 | } | 69 | } |
59 | }); | 70 | }); |
71 | + | ||
72 | + $('.bundle-nav').on('click', (e) => { | ||
73 | + let url = $(e.currentTarget).find('a').attr('href'); | ||
74 | + | ||
75 | + window.location.href = url; | ||
76 | + }); | ||
60 | }, | 77 | }, |
61 | regProductSwiper() { | 78 | regProductSwiper() { |
62 | let self = this; | 79 | let self = this; |
-
Please register or login to post a comment