Browse Source

快捷绑卡bug

xiongzhu 3 years ago
parent
commit
ad03fa7b57
1 changed files with 15 additions and 16 deletions
  1. 15 16
      src/views/user/Wallet.vue

+ 15 - 16
src/views/user/Wallet.vue

@@ -301,10 +301,7 @@ export default {
                     window.open(
                         resolveUrl(
                             this.$baseUrl,
-                            '/payOrder/v2/recharge/sandQuick?userId=' +
-                                this.$store.state.userInfo.id +
-                                '&amount=' +
-                                this.amount
+                            `/payOrder/v2/recharge/sandQuick?userId=${this.$store.state.userInfo.id}&amount=${this.amount}`
                         )
                             .replace('www.raex.vip', 'jump.raex.vip')
                             .replace('test.raex.vip', 'jumptest.raex.vip'),
@@ -312,18 +309,20 @@ export default {
                     );
                     break;
                 case 'QUICK_BIND':
-                    window.open(
-                        resolveUrl(
-                            this.$baseUrl,
-                            '/payOrder/v2/recharge/sandQuickBind?userId=' +
-                                this.$store.state.userInfo.id +
-                                '&amount=' +
-                                this.amount
-                        )
-                            .replace('www.raex.vip', 'jump.raex.vip')
-                            .replace('test.raex.vip', 'jumptest.raex.vip'),
-                        '_blank'
-                    );
+                    this.$toast.loading('充值中');
+                    this.$http
+                        .get('/payOrder/v2/recharge/sandQuickBind', {
+                            userId: this.$store.state.userInfo.id,
+                            amount: this.amount
+                        })
+                        .then(res => {
+                            this.$toast.clear();
+                            this.openScheme(res);
+                        })
+                        .catch(e => {
+                            this.$toast.clear();
+                            this.$toast(e.error || '充值失败');
+                        });
                     break;
                 case 'SYXPAY':
                     this.$router.push({