ソースを参照

银行卡支付修改

yuany 3 年 前
コミット
5b825f38ae
1 ファイル変更23 行追加4 行削除
  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 {