huangxiaojing 2 anni fa
parent
commit
e719142454
1 ha cambiato i file con 21 aggiunte e 20 eliminazioni
  1. 21 20
      pages/activity/lottery/index.vue

+ 21 - 20
pages/activity/lottery/index.vue

@@ -44,7 +44,7 @@
             <div v-for="item in mealList" :key="item.id" :class="selMealId === item.id ? 'coupon-2 active' : 'coupon-2'" @click=" selMealId = item.id;originalPrice=+item.originalPrice;makePoint(item.day === 30 ? 'activity_38月卡' : 'activity_268年卡');">
             <div v-for="item in mealList" :key="item.id" :class="selMealId === item.id ? 'coupon-2 active' : 'coupon-2'" @click=" selMealId = item.id;originalPrice=+item.originalPrice;makePoint(item.day === 30 ? 'activity_38月卡' : 'activity_268年卡');">
               <div class="coupon-title">
               <div class="coupon-title">
                 <span>¥</span><span class="txt2">{{
                 <span>¥</span><span class="txt2">{{
-                item.originalPrice ? item.originalPrice : item.actualPrice
+                item.actualPrice
               }}</span>
               }}</span>
               </div>
               </div>
               <div class="txt4">{{ item.day === 30 ? '月卡' : '年卡' }}</div>
               <div class="txt4">{{ item.day === 30 ? '月卡' : '年卡' }}</div>
@@ -74,7 +74,6 @@
         原价¥{{originalPrice}}
         原价¥{{originalPrice}}
         <div class="buy-bar-btn" @click="createOrder">
         <div class="buy-bar-btn" @click="createOrder">
           <div>立即购买</div>
           <div>立即购买</div>
-          <div>(节省¥{{originalPrice-actualPrice}})</div>
         </div>
         </div>
       </div>
       </div>
       <div class="txt6">
       <div class="txt6">
@@ -306,6 +305,14 @@ export default {
       this.originalPrice = this.yearOriginalPrice
       this.originalPrice = this.yearOriginalPrice
     },
     },
     async createOrder() {
     async createOrder() {
+      if (!this.checked) {
+        Toast({
+          message: '请勾选并且阅读购买协议',
+          position: 'top',
+          duration: 4000
+        });
+        return
+      }
       try {
       try {
         Toast.loading({
         Toast.loading({
           duration: 0,
           duration: 0,
@@ -323,7 +330,7 @@ export default {
         taocan = this.sort_ASCII(taocan);
         taocan = this.sort_ASCII(taocan);
         const sign = this.jiaqian(JSON.stringify(taocan));
         const sign = this.jiaqian(JSON.stringify(taocan));
         const res = await this.$axios.$post('/pay/v1/order/create', taocan, {
         const res = await this.$axios.$post('/pay/v1/order/create', taocan, {
-          headers: { Authorization: this.token, sign },
+          headers: { Authorization: this.token, sign }, client: this.client
         });
         });
         Toast.clear();
         Toast.clear();
         if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
         if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
@@ -435,13 +442,15 @@ export default {
         this.luckDrawType = res.data.luckDrawType;
         this.luckDrawType = res.data.luckDrawType;
         if (res.data.luckDrawType === 1) {
         if (res.data.luckDrawType === 1) {
           this.makePoint('activity_15.9年卡');
           this.makePoint('activity_15.9年卡');
-          if (Number(localStorage.getItem('year-15-9')) !== 2)
+          if (Number(localStorage.getItem('year-15-9')) !== 2) {
             localStorage.setItem('year-15-9', 1);
             localStorage.setItem('year-15-9', 1);
+          }
         }
         }
         if (res.data.luckDrawType === 2) {
         if (res.data.luckDrawType === 2) {
-          if (Number(localStorage.getItem('year-9-9')) !== 2)
-            this.makePoint('activity_9.9年卡');
-          localStorage.setItem('year-9-9', 1);
+          this.makePoint('activity_9.9年卡');
+          if (Number(localStorage.getItem('year-9-9')) !== 2) {
+            localStorage.setItem('year-9-9', 1);
+          }
         }
         }
 
 
         this.mealId = res.data.mealId
         this.mealId = res.data.mealId
@@ -525,11 +534,11 @@ export default {
     },
     },
     closed() {
     closed() {
       this.makePoint('activity_关闭抽奖', 'eventCode传27_抽奖流程');
       this.makePoint('activity_关闭抽奖', 'eventCode传27_抽奖流程');
-      if (Number(localStorage.getItem('year-15-9')) !== 2) {
+      if (+localStorage.getItem('year-15-9') !== 2) {
         this.show = true;
         this.show = true;
         localStorage.setItem('year-15-9', 2);
         localStorage.setItem('year-15-9', 2);
       }
       }
-      if (Number(localStorage.getItem('year-9-9')) !== 2) {
+      if (+localStorage.getItem('year-9-9') !== 2) {
         this.show = true;
         this.show = true;
         localStorage.setItem('year-9-9', 2);
         localStorage.setItem('year-9-9', 2);
       }
       }
@@ -581,14 +590,7 @@ export default {
       font-size: 18px;
       font-size: 18px;
       font-weight: 600;
       font-weight: 600;
       color: #FFFFFF;
       color: #FFFFFF;
-      line-height: 24px;
-      margin-top: 5px;
-    }
-    & div:nth-child(2) {
-      text-align: center;
-      font-size: 12px;
-      color: #FFFFFF;
-      line-height: 24px;
+      line-height: 50px;
     }
     }
   }
   }
   .buy-bar {
   .buy-bar {
@@ -664,12 +666,11 @@ export default {
   margin: 0 auto;
   margin: 0 auto;
 }
 }
 .lottery-swipe {
 .lottery-swipe {
-  width: 188px;
+  width: 100vw;
   height: 25px;
   height: 25px;
   background: rgba($color: #000000, $alpha: 0.24);
   background: rgba($color: #000000, $alpha: 0.24);
-  border-radius: 0px 16px 16px 0px;
   position: absolute;
   position: absolute;
-  top: 134px;
+  top: 0px;
   left: 0;
   left: 0;
   z-index: 1;
   z-index: 1;
 }
 }