kk.shi %!s(int64=3) %!d(string=hai) anos
pai
achega
a7d3c761b1

+ 4 - 4
pages/luckDraw/prize.js

@@ -119,15 +119,15 @@ Page({
 
   /**
    * 页面上拉触底事件的处理函数
-   
+   */
   onReachBottom: function () {
-      if (this.data.lock || this.data.noMore) {
+      if (this.data.lock || this.data.noResult) {
           return
       }
       this.data.lock = true
       this.data.page++
       this.getUserPrizeList()
-  },*/
+  },
 
   toProfile(e) {
     const url = "profile?id=" + e.currentTarget.dataset.id
@@ -137,7 +137,7 @@ Page({
    },
     turnPrize: function() {
         console.log("开始查看")
-        if (this.isLock || !this.data.isLogin) {
+        if (this.islock || !this.data.isLogin) {
             return
         }
     },

+ 7 - 1
pages/luckDraw/prize.wxml

@@ -14,7 +14,7 @@
         <view class="luck-draw-cz">优惠券</view>
       </view>
       <!-- 奖品 -->
-      <view class="luck-draw-prize" catchtap="toDetail">
+      <view class="luck-draw-prize">
         <view class="luck-draw-pn">{{productNum}}</view>
         <view class="luck-draw-pz">奖品</view>
         <view class="luck-draw-cjh"><view class="luck-draw-cj"></view></view>
@@ -34,6 +34,12 @@
           </view>
         </view>
         <image class="image_zk_un" src="/images/luck-draw/choice.png" />
+        <navigator class="_btn _exchange" 
+            target = "miniProgram" 
+            app-id="wxd92a2d29f8022f40"
+            path="page/index/index"
+            open-type='navigate'> 
+            </navigator>
       </view>
       <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>
     </view>

+ 9 - 0
pages/luckDraw/prize.wxss

@@ -98,6 +98,15 @@
   bottom: 70rpx;
   right: 26rpx;
 }
+._btn {
+  display: inline-block;
+  width: 162rpx;
+  height: 56rpx;
+  position:absolute;
+  z-index: 3;
+  bottom: 70rpx;
+  right: 26rpx;
+}
 .luck-draw-discount1,.luck-draw-discount2,.luck-draw-zkz2,.luck-draw-djz4,.luck-draw-djz5{
   display: inline-block;
 }

+ 6 - 5
pages/luckDraw/profile.js

@@ -78,7 +78,7 @@ Page({
         LuckDraw.getUserPrizeList({
             page: this.data.page,
             pageSize: this.data.pageSize,
-            mobile:  getMobileCache(),
+            mobile: getMobileCache(),
             goodsType: 1
         }).then(res => {
             if (res.code == 200) {
@@ -119,16 +119,16 @@ Page({
 
     /**
      * 页面上拉触底事件的处理函数
-     
+    */
     onReachBottom: function () {
-        if (this.data.lock || this.data.noMore) {
+        if (this.data.lock || this.data.noResult) {
             return
         }
         this.data.lock = true
         this.data.page++
         this.getUserPrizeList()
     },
-    */
+    
 
     toPrize(e) {
         const url = "prize?id=" + e.currentTarget.dataset.id
@@ -138,9 +138,10 @@ Page({
     },
     turnPrize: function() {
         console.log("开始查看")
-        if (this.isLock || !this.data.isLogin) {
+        if (this.lock || !this.data.isLogin) {
             return
         }
+        this.lock = true
     },
     // 授权手机号
     getPhoneNumber(e) {

+ 13 - 1
pages/luckDraw/profile.wxml

@@ -22,7 +22,7 @@
     </view>
     <view class="luck-draw-theme">
       <!-- 折扣券 -->
-      <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" catchtap="toDetail" wx:if="{{item.couponType == 'D'}}">
+      <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" wx:if="{{item.couponType == 'D'}}">
         <view class="luck-draw-words">
           <view class="luck-draw-discount1">
             <view class="luck-draw-zkz4">{{item.discount ?item.discount:0}}</view>
@@ -40,11 +40,23 @@
         </view>
         <image class="image_zk" src="/images/luck-draw/coupon1.png" />
         <image class="image_zk_un" src="/images/luck-draw/coupon_use_now.png" />
+        <navigator class="_btn _exchange" 
+            target = "miniProgram" 
+            app-id="wxd92a2d29f8022f40"
+            path="page/index/index"
+            open-type='navigate'> 
+            </navigator>
       </view>
       <!-- 代金券 -->
       <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" catchtap="toDetail" wx:if="{{item.couponType == 'C'}}">
         <image class="image_zk" src="/images/luck-draw/cash_coupon.png" />
         <image class="image_zk_un" src="/images/luck-draw/cc_use_now.png" />
+            <navigator class="_btn _exchange" 
+            target = "miniProgram" 
+            app-id="wxd92a2d29f8022f40"
+            path="page/index/index"
+            open-type='navigate'> 
+            </navigator>
         <view class="luck-draw-words">
           <view class="luck-draw-discount1">
             <view class="luck-draw-djz4">¥</view>

+ 21 - 1
pages/luckDraw/profile.wxss

@@ -94,10 +94,20 @@
   width: 162rpx;
   height: 56rpx;
   position:absolute;
-  z-index: 2;
+  z-index: 3;
   bottom: 70rpx;
   right: 26rpx;
 }
+._btn {
+  display: inline-block;
+  width: 162rpx;
+  height: 56rpx;
+  position:absolute;
+  z-index: 3;
+  bottom: 70rpx;
+  right: 26rpx;
+}
+
 .luck-draw-discount1,.luck-draw-discount2,.luck-draw-zkz4,.luck-draw-zkz5,.luck-draw-zkz21,.luck-draw-zkz22,.luck-draw-zkz2,.luck-draw-djz4,.luck-draw-djz5{
   display: inline-block;
 }
@@ -203,4 +213,14 @@
   z-index: 2;
   text-align: center;
   top: 180rpx;
+}
+
+.btns {
+  height: 96rpx;
+  width: 100%;
+  position: absolute;
+  top: 651rpx;
+  display: flex;
+  justify-content:center;
+  z-index: 3;
 }

+ 5 - 5
pages/luckDraw/recordPrize.js

@@ -77,7 +77,7 @@ Page({
         LuckDraw.getUserDrawRecord({
             page: this.data.page,
             pageSize: this.data.pageSize,
-            mobile:  getMobileCache(),
+            mobile: getMobileCache(),
             goodsType: 1
         }).then(res => {
             if (res.code == 200) {
@@ -116,16 +116,16 @@ Page({
 
     /**
      * 页面上拉触底事件的处理函数
-     
+     */
     onReachBottom: function () {
-        if (this.data.lock || this.data.noMore) {
+        if (this.data.lock || this.data.noResult) {
             return
         }
         this.data.lock = true
         this.data.page++
-        this.getUserPrizeList()
+        this.getUserDrawRecord()
     },
-    */
+    
 
    toRecordPrize(e) {
         const url = "recordPrize?id=" + e.currentTarget.dataset.id