Explorar el Código

Merge remote-tracking branch 'origin/jeffrey/feat/coupon-center' into jeffrey/feat/coupon-center

xing.li hace 3 años
padre
commit
e948d8781a
Se han modificado 2 ficheros con 18 adiciones y 13 borrados
  1. 13 2
      pages/luckDraw/profile.js
  2. 5 11
      pages/luckDraw/profile.wxml

+ 13 - 2
pages/luckDraw/profile.js

@@ -19,6 +19,7 @@ Page({
         mobileTop: 'TONY WU',
         couponNum: 0,
         productNum: 0,
+        thirdPrizeNum: 0,
         goodsType: 1,
         goodsItemList: []
 
@@ -107,6 +108,7 @@ Page({
                     mobileTop:getMobileCache(),
                     couponNum: data.couponNum,
                     productNum: data.productNum,
+                    thirdPrizeNum: data.thirdPrizeNum,
                     noResult: true
                 })
             } else {
@@ -133,7 +135,8 @@ Page({
         if (this.data.page == 1) {
             this.setData({
                 couponNum: data.couponNum,
-                productNum: data.productNum
+                productNum: data.productNum,
+                thirdPrizeNum: data.thirdPrizeNum,
             })
           }
         this.data.goodsItemList = this.data.goodsItemList.concat(...data.goodsItemList)
@@ -180,7 +183,7 @@ Page({
             hidden1: true,
             hidden2: false,
             page: 1,
-            goodsType: 2,
+            goodsType: 3,
             noMore: false,
             noResult: false
         })
@@ -212,4 +215,12 @@ Page({
             url
         })
     },
+    toLookHitPhoto(e) {
+        console.log(e)
+        let url = e.currentTarget.dataset.src;
+        wx.previewImage({
+              current: url, // 当前显示图片的http链接
+              urls: [url] // 需要预览的图片http链接列表
+        })
+    },
 })

+ 5 - 11
pages/luckDraw/profile.wxml

@@ -18,9 +18,9 @@
       </view>
       <!-- 奖品 -->
       <view class="luck-draw-prize" catchtap="getPrize">
-        <view class="luck-draw-pn">{{productNum}}</view>
+        <view class="luck-draw-pn">{{thirdPrizeNum}}</view>
         <view class="luck-draw-pz">奖品</view>
-        <view wx:if="{{goodsType == 2}}" class="luck-draw-cjh"><view class="luck-draw-cj"></view></view>
+        <view wx:if="{{goodsType == 3}}" class="luck-draw-cjh"><view class="luck-draw-cj"></view></view>
       </view>
     </view>
     <view id="couponZD" class="luck-draw-theme" hidden="{{hidden1}}">
@@ -92,7 +92,7 @@
 
     <view id="prize" class="luck-draw-theme" hidden="{{hidden2}}">
       <!-- 奖品 -->
-      <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" wx:if="{{item.goodsType == 2}}">
+      <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" wx:if="{{item.goodsType == 3}}">
         <view class="luck-draw-wordsj">
           <view class="luck-draw-discount1j">
            
@@ -103,14 +103,8 @@
             <view class="luck-draw-zkz3j">奖品参数</view>
           </view>
         </view>
-        <image class="image_zk_unj" src="/images/luck-draw/choice.png" />
-        <navigator class="_btn _exchange" 
-            target = "miniProgram" 
-            app-id="wxd92a2d29f8022f40"
-            path="pages/index/index"
-            extra-data="{foo: 'bar'}"
-            open-type='navigate'> 
-            </navigator>
+        <image class="image_zk_unj" src="/images/luck-draw/coupon_use_now.png" />
+        <view data-src="{{item.fullGoodsBigImage}}" catchtap="toLookHitPhoto" class="_btn _exchange"></view>
       </view>
       <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>
       <view class="no_result" wx:if="{{noMore}}">———— 更多奖品 | 敬请期待 ————</view>