huangxiaojing 2 lat temu
rodzic
commit
3848d082bf

+ 5 - 9
pages/welfare-community/index.vue

@@ -28,14 +28,6 @@ export default {
       isLoading: false
     }
   },
-  async fetch() {
-    if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
-      this.token = await window.native.getToken();
-    } else {
-      this.token = this.$route.query.token;
-    }
-    this.getAppGameGiftActivityList()
-  },
   head: {
     title: '福利社区',
   },
@@ -46,6 +38,10 @@ export default {
       }
     }
   },
+  created() {
+    this.token = this.$route.query.token;
+    this.getAppGameGiftActivityList()
+  },
   methods: {
     view(id, gameName) {
       this.$router.push({ path: '/welfare-community/list', query: { token: this.$route.query.token, id, user: this.$route.query.user, gameName } })
@@ -93,7 +89,7 @@ export default {
 }
 .bg101010 {
   background: #101010;
-  min-height: 100vh;
+  min-height: calc(100vh - 15px);
   padding-top: 15px;
 }
 .box-card {

+ 6 - 0
pages/welfare-community/list.vue

@@ -112,11 +112,17 @@ export default {
       if (this.$userAgent.isSzx && this.$userAgent.isIos) {
         window.webkit.messageHandlers.order.postMessage({});
       }
+      if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
+        window.native.startPurchase();
+      }
     },
     login() {
       if (this.$userAgent.isSzx && this.$userAgent.isIos) {
         window.webkit.messageHandlers.showLogin.postMessage({});
       }
+      if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
+        window.native.startBindPhone();
+      }
     },
     ended() {
       this.showAd = false