kk.shi преди 3 години
родител
ревизия
d7d860a4cb
променени са 4 файла, в които са добавени 14 реда и са изтрити 4 реда
  1. 9 2
      components/couponWrap/index.js
  2. 1 0
      components/couponWrap/index.wxml
  3. 2 1
      pages/welfareMall/couponFitFood/index.js
  4. 2 1
      pages/welfareMall/couponFitFood/index.wxml

+ 9 - 2
components/couponWrap/index.js

@@ -148,8 +148,15 @@ Component({
             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,
+              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 wx:if="{{item.bindGoodsType == 3}}">
                           <text>不适用商品</text>
+                          <text class="look_more_txt" data-index="{{index}}" catchtap="toFixFoodPageNo">点击查看>></text>
                         </block>
                    </view>
                    <view class="coupon-detail-line">

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

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

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

@@ -9,7 +9,8 @@
                  <view class="coupon-circule _left" ></view>
                  <view class="coupon-circule _right"></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_item" wx:for="{{foodList}}" wx:key="index">
                 <text class="_star">◆</text> <text class="_text">{{item}}</text>