Przeglądaj źródła

不适用商品调整

kk.shi 3 lat temu
rodzic
commit
d7d860a4cb

+ 9 - 2
components/couponWrap/index.js

@@ -148,8 +148,15 @@ Component({
             const couponId = this.data.list[e.currentTarget.dataset.index].couponId;
             const couponId = this.data.list[e.currentTarget.dataset.index].couponId;
             const title = this.data.list[e.currentTarget.dataset.index].title;
             const title = this.data.list[e.currentTarget.dataset.index].title;
             wx.navigateTo({
             wx.navigateTo({
-                url: '/pages/welfareMall/couponFitFood/index?couponId=' + couponId + "&couponName=" + title,
+              url: '/pages/welfareMall/couponFitFood/index?couponId=' + couponId + "&couponName=" + title + "&bindGoodsType=" + 1,
             })
             })
-        }
+        },
+        toFixFoodPageNo(e) {
+          const couponId = this.data.list[e.currentTarget.dataset.index].couponId;
+          const title = this.data.list[e.currentTarget.dataset.index].title;
+          wx.navigateTo({
+            url: '/pages/welfareMall/couponFitFood/index?couponId=' + couponId + "&couponName=" + title + "&bindGoodsType=" + 3,
+          })
+      }
     }
     }
 })
 })

+ 1 - 0
components/couponWrap/index.wxml

@@ -74,6 +74,7 @@
                         </block>
                         </block>
                         <block wx:if="{{item.bindGoodsType == 3}}">
                         <block wx:if="{{item.bindGoodsType == 3}}">
                           <text>不适用商品</text>
                           <text>不适用商品</text>
+                          <text class="look_more_txt" data-index="{{index}}" catchtap="toFixFoodPageNo">点击查看>></text>
                         </block>
                         </block>
                    </view>
                    </view>
                    <view class="coupon-detail-line">
                    <view class="coupon-detail-line">

+ 2 - 1
pages/welfareMall/couponFitFood/index.js

@@ -21,7 +21,8 @@ Page({
         }
         }
         this.data.couponId = options.couponId
         this.data.couponId = options.couponId
         this.setData({
         this.setData({
-            couponName: decodeURIComponent(options.couponName)
+            couponName: decodeURIComponent(options.couponName),
+            bindGoodsType: options.bindGoodsType
         })
         })
         this.loadData()
         this.loadData()
     },
     },

+ 2 - 1
pages/welfareMall/couponFitFood/index.wxml

@@ -9,7 +9,8 @@
                  <view class="coupon-circule _left" ></view>
                  <view class="coupon-circule _left" ></view>
                  <view class="coupon-circule _right"></view>
                  <view class="coupon-circule _right"></view>
            </view>
            </view>
-            <view class="_s_t">指定可用商品:</view>
+            <view class="_s_t" wx:if="{{bindGoodsType == 1}}">指定可用商品:</view>
+            <view class="_s_t" wx:if="{{bindGoodsType == 3}}">不适用商品:</view>
             <view class="_pro_list">
             <view class="_pro_list">
               <view class="_pro_item" wx:for="{{foodList}}" wx:key="index">
               <view class="_pro_item" wx:for="{{foodList}}" wx:key="index">
                 <text class="_star">◆</text> <text class="_text">{{item}}</text>
                 <text class="_star">◆</text> <text class="_text">{{item}}</text>