huangxiaojing 2 vuotta sitten
vanhempi
commit
3b69005122
1 muutettua tiedostoa jossa 13 lisäystä ja 12 poistoa
  1. 13 12
      pages/activity/lottery/index.vue

+ 13 - 12
pages/activity/lottery/index.vue

@@ -305,6 +305,16 @@ export default {
     } else {
       this.token = this.$route.query.token;
     }
+    
+    if (this.$userAgent.isAndroid) {
+      this.client = 1;
+    } else if (this.$userAgent.isIos) {
+      this.client = 2;
+    } else if (this.$userAgent.isMiniProgram) {
+      this.client = 5;
+    } else {
+      this.client = 7;
+    }
   },
   head: {
     title: '年卡抽奖活动',
@@ -354,9 +364,9 @@ export default {
         };
         taocan = this.sort_ASCII(taocan);
         const sign = this.jiaqian(JSON.stringify(taocan));
-        if (this.$userAgent.isAndroid) {
+        if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
           this.client = 1;
-        } else if (this.$userAgent.isIos) {
+        } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
           this.client = 2;
         } else if (this.$userAgent.isMiniProgram) {
           this.client = 5;
@@ -364,7 +374,7 @@ export default {
           this.client = 7;
         }
         const res = await this.$axios.$post('/pay/v1/order/create', taocan, {
-          headers: { Authorization: this.token, sign }, client: this.client
+          headers: { Authorization: this.token, sign, client: this.client }
         });
         Toast.clear();
         if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
@@ -504,15 +514,6 @@ export default {
     },
     makePoint(positionButton) {
       const now = new Date();
-      if (this.$userAgent.isAndroid) {
-        this.client = 1;
-      } else if (this.$userAgent.isIos) {
-        this.client = 2;
-      } else if (this.$userAgent.isMiniProgram) {
-        this.client = 5;
-      } else {
-        this.client = 7;
-      }
       this.$axios.$post('/public/v5/buriedPointRecord/reportRecords', [
         {
           client: this.client,