Pārlūkot izejas kodu

Merge branch 'develop' of Software/android-cloud-H5 into release/v5.5

huangxiaojing 2 gadi atpakaļ
vecāks
revīzija
5772739ba0
2 mainītis faili ar 31 papildinājumiem un 26 dzēšanām
  1. 14 11
      pages/activity/doubleEleven/index.vue
  2. 17 15
      pages/activity/doubleEleven/pc.vue

+ 14 - 11
pages/activity/doubleEleven/index.vue

@@ -9,8 +9,6 @@
         </div>
       </div>
     </van-overlay>
-token:{{this.token}}
- 
       <div class="double-eleven-container">
 
         <div class="default" v-if="!couponsList.length">
@@ -67,7 +65,7 @@ token:{{this.token}}
           <div class="coupon">
             <div class="let-title">
             <div v-if="coupons.couponType===1">¥<span>{{coupons.couponValue}}</span></div>
-            <div v-else><span>{{coupons.couponValue}}</span>折</div>
+            <div v-else><span>{{coupons.deductionPrice}}</span>折</div>
             <div v-if="coupons.maxValue" class="maxValue">满{{ coupons.maxValue }}元减</div>
             <div v-else class="maxValue">{{ coupons.useThreshold }}</div>
            </div>
@@ -123,6 +121,7 @@ export default {
   async fetch() {
     if (this.$route.query.type === 'pc') {
       this.$router.push({ path: '/activity/doubleEleven/pc', query: { token: this.$route.query.token, type: 'pc' } })
+      return
     }
     if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
       this.token = await window.native.getToken();
@@ -134,7 +133,7 @@ export default {
       _this.token = token
       resolve();
       };
-    }else if(this.$route.query.token){
+    }else if(this.$route.query.token && this.$route.query.token != 'needToken'){
       this.token = this.$route.query.token;
     }
 
@@ -195,14 +194,18 @@ export default {
     {
       const res = await this.$axios.$post('/activity/v5/couponActivity/getCouponActivityInfo', {},
       { headers: { Authorization: this.token }});
-      res.data.forEach(element => {
+      if(res.status === 0)
+      {
+        res.data.forEach(element => {
           if(element.receivingStatus !== 3)
           {
-             element.remainder = element.remainder * 4
+             element.remainder = element.remainder
           }
-      });
-      this.couponsList = res.data;
-  
+        });
+        this.couponsList = res.data;
+      }
+   
+
     },
     async receiveCouponRewards(row)
     {
@@ -212,7 +215,7 @@ export default {
           const _this = this
           // setTimeout(() => {window.location.href='https://client.phone.androidscloud.com/cloud/phone/web/#/pages/login/index';_this.login = false},1000);
 
-          setTimeout(() => {window.location.href='http://prese.phone.androidscloud.com/cloud/phone/web/#/pages/index/index';_this.login = false},1000);
+          setTimeout(() => {window.location.href='https://prese.phone.androidscloud.com/cloud/phone/web/#/pages/index/index';_this.login = false},1000);
           
           return
         }
@@ -246,7 +249,7 @@ export default {
           }catch (error) {
             Toast.clear();
             this.loading = false
-            await this.getCoupons()
+            // await this.getCoupons()
             Toast({
               message: error.message,
               position: 'top',

+ 17 - 15
pages/activity/doubleEleven/pc.vue

@@ -9,7 +9,6 @@
           </div>
         </div>
       </van-overlay>
-      token:{{this.token}}
         <div class="double-eleven-container">
 
           <div class="default" v-if="!couponsList.length">
@@ -37,7 +36,7 @@
             <!-- <div class="icon">{{item.couponName}}</div> -->
             <div class="let-title">
               <div  v-if="item.couponType===1">¥<span>{{item.couponValue}}</span></div>
-              <div  v-else><span>{{item.couponValue}}</span>折</div>
+              <div  v-else><span>{{item.deductionPrice}}</span>折</div>
               <div v-if="item.maxValue" class="maxValue">满{{ item.maxValue }}元减</div>
               <div v-else class="maxValue">{{ item.useThreshold }}</div>
             </div>
@@ -61,7 +60,7 @@
   
     <van-popup v-model="show" style="background: transparent;" :close-on-click-overlay="false">
            <div class="popup-container">
-            <!-- <div class="coupon">
+            <div class="coupon">
               <div class="let-title">
                 <div v-if="coupons.couponType===1">¥<span>{{coupons.couponValue}}</span></div>
                 <div v-else><span>{{coupons.deductionPrice}}</span>折</div>
@@ -73,9 +72,9 @@
                   <div class="tips">{{coupons.couponExplain}}</div>
                   <div class="number">有效期:{{coupons.validityPeriod}}</div>
                 </div>
-            </div> -->
+            </div>
   
-              <div class="coupon" >
+              <!-- <div class="coupon" >
                 <div class="let-title">
                   <div><span>7</span>折</div>
                   <div class="maxValue">折扣券</div>
@@ -85,7 +84,7 @@
                   <div class="tips">满90元可用,优惠券有效期<span style="color:#D358A8">3</span>天</div>
                   <div class="number">剩余数量:2893张</div>
                 </div>
-              </div>
+              </div> -->
   
   
             <img src="~/assets/image/activity/double-eleven/btn2.png" width="100%"  @click="goOrder">
@@ -106,7 +105,7 @@
     },
     data() {
       return {
-        show:true,
+        show:false,
         coupons:{},
         login:false,
         loading:false,
@@ -118,7 +117,7 @@
     async fetch() {
       if (this.$route.query.type === 'pc') {
         this.token =  window.vgeminipc.getToken()
-      } else if(this.$route.query.token){
+      } else if(this.$route.query.token && this.$route.query.token != 'needToken'){
         this.token = this.$route.query.token;
       }
   
@@ -163,13 +162,16 @@
       {
         const res = await this.$axios.$post('/activity/v5/couponActivity/getCouponActivityInfo', {},
         { headers: { Authorization: this.token }});
-        res.data.forEach(element => {
+        if(res.status === 0)
+        {
+          res.data.forEach(element => {
             if(element.receivingStatus !== 3)
             {
-               element.remainder = element.remainder * 4
+              element.remainder = element.remainder
             }
-        });
-        this.couponsList = res.data;
+          });
+          this.couponsList = res.data;
+        }
     
       },
       async receiveCouponRewards(row)
@@ -178,8 +180,8 @@
           {
             this.login = true
             const _this = this
-            // setTimeout(() => {window.location.href='https://client.phone.androidscloud.com/cloud/phone/web/#/pages/login/index';_this.login = false},1000);
-            setTimeout(() => {window.location.href='http://prese.phone.androidscloud.com/cloud/phone/web/#/pages/index/index';_this.login = false},1000);
+            // setTimeout(() => {window.location.href='http://client.phone.androidscloud.com/cloud/phone/web/#/pages/login/index';_this.login = false},1000);
+            setTimeout(() => {window.location.href='https://prese.phone.androidscloud.com/cloud/phone/web/#/pages/index/index';_this.login = false},1000);
             return
           }
       
@@ -210,7 +212,7 @@
             }catch (error) {
               Toast.clear();
               this.loading = false
-              await this.getCoupons()
+              // await this.getCoupons()
               Toast({
                 message: error.message,
                 position: 'top',