Pārlūkot izejas kodu

优化小程序代码

yanj 1 mēnesi atpakaļ
vecāks
revīzija
78416ea240
3 mainītis faili ar 29 papildinājumiem un 14 dzēšanām
  1. 3 2
      pages/checkIn/checkInRoute.vue
  2. 15 9
      pages/user/award.vue
  3. 11 3
      pages/user/index.vue

+ 3 - 2
pages/checkIn/checkInRoute.vue

@@ -20,6 +20,7 @@
                 <mp-html :content="routeInfoData.description"></mp-html>
               </view>
               <view v-show="!current_page" class="page-item">
+<!--                <mp-html :content="routeInfoData.rules"></mp-html>-->
                 <view style="margin-bottom: 24rpx;">2025慕尼黑上海电子展展会现场将设有9条热门路线。观众可参与打卡调整。
                   <text style="font-weight: bold;color: #E57519;">
                     打卡满任意2条,5条,8条分别获对应礼品。满9条路线完成终极挑战,除获得对应礼品以外,更有机会参与抽奖,赢取幸运大奖。
@@ -35,13 +36,13 @@
                 </view>
                 <view style="margin-bottom: 24rpx;">
                   <text style="font-weight: bold;">奖品兑换区:</text>
-                  展会现场礼品发放处【展位号待定
+                  展会现场礼品发放处【W3.3689
                 </view>
                 <view style="margin-bottom: 16rpx;">① 展会期间,每人可领取完成最高线路的对应奖品,每人仅有一次兑奖机会。
                 </view>
                 <view style="margin-bottom: 16rpx;">② 礼品数量有限,仅限展会期间领取,先到先得,一旦赠完即止。</view>
                 <view style="margin-bottom: 16rpx;">③
-                  【我的奖品】页面可了解获奖详情。点击【可领取奖品】至展会现场礼品发放处【展位号待定】进行奖品核销与兑换。
+                  【我的奖品】页面可了解获奖详情。点击【可领取奖品】至展会现场礼品发放处【W3.3689】进行奖品核销与兑换。
                 </view>
                 <view>④ 满9条路线的观众可将名片放置抽奖箱,获奖结果将于展后公布。</view>
               </view>

+ 15 - 9
pages/user/award.vue

@@ -269,15 +269,18 @@ export default {
       }).then(res => {
         if (res.code === 0) {
           this.qr_code = res.data.qrcode_url
+          if(res.data.verify_note) {
+            this.verify_note.company_name = res.data.verify_note.company_name
+            this.verify_note.verify_name = res.data.verify_note.verify_name
+            this.verify_note.verify_phone = res.data.verify_note.verify_phone
+          }
           this.current_gift.form_id = res.data.id
           //展示二维码
-          this.show_qr = true
-          this.checkGiftState(() => {
-            if (this.current_gift.route_count === 9) {
-              //轮询确认核销后,展示抽奖环节
-              this.pop_up = true
-            }
-          })
+          if (this.current_gift.route_count === 9) {
+            //轮询确认核销后,展示抽奖环节
+            this.pop_up = true
+          }
+
         }
       })
     },
@@ -360,8 +363,11 @@ export default {
             icon: 'none'
           })
           this.pop_up = false
-          this.getGiftListEvent()
-          this.getCheckinCount()
+          this.show_qr = true
+          this.checkGiftState(() => {
+            this.getGiftListEvent()
+            this.getCheckinCount()
+          })
         })
 
       }

+ 11 - 3
pages/user/index.vue

@@ -75,7 +75,7 @@
                 <view class="iconfont icon-Check"></view> 核销奖品成功
               </view>
               <view class="overlay_image">
-                <image mode="widthFix" :src="decodeInfo.picture_url"></image>
+                <image mode="widthFix" v-show="decodeInfo.picture_url" :src="decodeInfo.picture_url"></image>
               </view>
               <view class="overlay_name">
                 奖品:{{ decodeInfo.name }}
@@ -162,7 +162,11 @@ export default {
   data() {
     return {
       prizeShow: false,
-      decodeInfo: {},
+      decodeInfo: {
+        name: '',
+        route_count: '',
+        picture_url: ''
+      },
       activityOff: 0,
       adInfo: {
         ad_file: ''
@@ -182,7 +186,11 @@ export default {
     },
     hideOverlay() {
       this.prizeShow = false
-      this.decodeInfo = {}
+      this.decodeInfo = {
+        name: '',
+        route_count: '',
+        picture_url: ''
+      }
     },
     getSceneParamsEvent(finalStr) {
       const {a, t} = finalStr.split('&').reduce((obj, pair) => {