panhui 4 vuotta sitten
vanhempi
commit
a2cc0995d8
2 muutettua tiedostoa jossa 14 lisäystä ja 13 poistoa
  1. 1 1
      src/main/nine-space/.env.development
  2. 13 12
      src/main/nine-space/src/views/Submit.vue

+ 1 - 1
src/main/nine-space/.env.development

@@ -1 +1 @@
-VUE_APP_BASE_URL=https://nfttest.9space.vip
+VUE_APP_BASE_URL=http://192.168.50.120:8080

+ 13 - 12
src/main/nine-space/src/views/Submit.vue

@@ -152,18 +152,12 @@ export default {
         this.bottom = this.$refs.bottom;
     },
     methods: {
-        refreashOrder() {
-            this.getOrder();
-            if (this.timer) {
-                clearTimeout(this.timer);
-            }
-            this.timer = setTimeout(() => {
-                this.refreashOrder();
-            }, 1000);
-        },
-        getOrder() {
+        getOrder(next = false) {
             this.$http.get('/order/get/' + this.orderId).then(res => {
                 this.info = res;
+                if (this.timer) {
+                    clearTimeout(this.timer);
+                }
                 if (res.status === 'PROCESSING' || res.status === 'CANCELLED') {
                     this.$dialog
                         .alert({
@@ -179,6 +173,10 @@ export default {
                             }
                             // on close
                         });
+                } else if (next) {
+                    this.timer = setTimeout(() => {
+                        this.getOrder(next);
+                    }, 1000);
                 }
             });
         },
@@ -225,9 +223,12 @@ export default {
                                     this.$http
                                         .get(`/payOrder/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`)
                                         .then(res => {
-                                            window.open('alipays://platformapi/startapp?saId=10000007&qrcode=' + res);
+                                            window.open(
+                                                'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
+                                                '_blank'
+                                            );
                                             if (!this.inApp) {
-                                                this.refreashOrder();
+                                                this.getOrder(true);
                                             }
                                         });
                                 }