Authored by 陈轩

商品详情页领券: 限定商品不参加

@@ -1254,6 +1254,7 @@ const _detailDataPkg = (origin, ua) => { @@ -1254,6 +1254,7 @@ const _detailDataPkg = (origin, ua) => {
1254 dest.brandId = origin.brand_id || 0; 1254 dest.brandId = origin.brand_id || 0;
1255 1255
1256 dest.productSkn = origin.product_skn; 1256 dest.productSkn = origin.product_skn;
  1257 + dest.isLimitBuy = Number(origin.isLimitBuy); // 1 限购商品, 0 非限购商品
1257 1258
1258 // 商品信息 1259 // 商品信息
1259 if (origin.goods_list.length) { 1260 if (origin.goods_list.length) {
@@ -160,6 +160,7 @@ @@ -160,6 +160,7 @@
160 160
161 <input id="productSkn" type="hidden" value="{{productSkn}}"> 161 <input id="productSkn" type="hidden" value="{{productSkn}}">
162 <input id="brand-id" type="hidden" value="{{brandId}}"> 162 <input id="brand-id" type="hidden" value="{{brandId}}">
  163 + <input id="product-limit" type="hidden" value="{{isLimitBuy}}">
163 164
164 <input type="hidden" class="data-bind" name="loginUrl" id="loginUrl" value=""> 165 <input type="hidden" class="data-bind" name="loginUrl" id="loginUrl" value="">
165 166
@@ -117,6 +117,10 @@ var brandCoupon = { @@ -117,6 +117,10 @@ var brandCoupon = {
117 117
118 118
119 $(function() { 119 $(function() {
  120 + if ($('#product-limit').val() !== '0') { // 限购商品 不展示优惠券
  121 + return;
  122 + }
  123 +
120 brandCoupon.init( 124 brandCoupon.init(
121 $('#productSkn').val(), 125 $('#productSkn').val(),
122 $('#brand-id').val() 126 $('#brand-id').val()