huangxiaojing 2 gadi atpakaļ
vecāks
revīzija
28e9dbe01e
1 mainītis faili ar 18 papildinājumiem un 12 dzēšanām
  1. 18 12
      pages/activity/lottery/index.vue

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

@@ -313,18 +313,6 @@ export default {
     this.getLuckDrawActivity();
     this.getCarouselList();
   },
-  mounted() {
-    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;
-    }
-    console.log(this.client);
-  },
   methods: {
     async getCarouselList() {
       const res = await this.$axios.$post('/activity/v1/member/carousel');
@@ -366,6 +354,15 @@ export default {
         };
         taocan = this.sort_ASCII(taocan);
         const sign = this.jiaqian(JSON.stringify(taocan));
+        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;
+        }
         const res = await this.$axios.$post('/pay/v1/order/create', taocan, {
           headers: { Authorization: this.token, sign }, client: this.client
         });
@@ -520,6 +517,15 @@ 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,