소스 검색

抽奖页面 当日没有抽奖机会样式修改

DESKTOP-O04BTUJ\muzen 2 년 전
부모
커밋
3d75edbb77
1개의 변경된 파일9개의 추가작업 그리고 5개의 파일을 삭제
  1. 9 5
      src/pages/lottery/index.vue

+ 9 - 5
src/pages/lottery/index.vue

@@ -26,7 +26,14 @@
 
     <!-- 弹窗 -->
     <uni-popup ref="popup" type="center">
-      <view class="popup">
+      <view v-if="this.hasLotteryCount <= 0" class="popup" style="justify-content: space-around">
+        <view>
+          <view>很遗憾!</view>
+          <view>今日抽奖次数已用光</view>
+        </view>
+        <img src="../../static/lottery/noChance.png" />
+      </view>
+      <view v-else class="popup">
         <view>{{ form.resultGoodName }}</view>
         <img :src="form.resultGoodPic" />
         <button v-if="form.resultGoodType === 4" @click="getSubmit">领取</button>
@@ -149,10 +156,7 @@ export default {
           })
         }
       } else {
-        uni.showToast({
-          icon: 'error',
-          title: '今日抽奖次数已用光'
-        })
+        this.$refs.popup.open()
       }
     },
     // 抽奖结束触发回调