Browse Source

Merge branch 'yuan' of panhui/lasuo_nft_front into master

yuanyuan 3 years ago
parent
commit
d6a191f0d9
1 changed files with 23 additions and 4 deletions
  1. 23 4
      src/views/Submit.vue

+ 23 - 4
src/views/Submit.vue

@@ -504,10 +504,29 @@ export default {
                                 this.getOrder(true);
                             }
                         } else if (this.payType === 'H5PAY') {
-                            document.location.href = resolveUrl(
-                                this.$baseUrl,
-                                '/payOrder/sandQuick?id=' + this.orderId
-                            );
+                            this.$http
+                                .get('/payOrder/sandQuick?id=' + this.orderId)
+                                .then(res => {
+                                    document.location.href = res;
+                                    this.getOrder(true);
+                                })
+                                .catch(e => {
+                                    this.$toast.clear();
+                                    e = e || {};
+                                    e.error = e.error || '支付失败';
+                                    this.$dialog
+                                        .alert({
+                                            title: '提示',
+                                            message: this.backReson(e.error)
+                                        })
+                                        .then(res => {
+                                            this.$router.back();
+                                        });
+                                });
+                            // document.location.href = resolveUrl(
+                            //     this.$baseUrl,
+                            //     '/payOrder/sandQuick?id=' + this.orderId
+                            // );
                         }
                     });
                 } else {