Browse Source

订单支付

panhui 4 years ago
parent
commit
2615388404
1 changed files with 12 additions and 2 deletions
  1. 12 2
      src/views/Submit.vue

+ 12 - 2
src/views/Submit.vue

@@ -185,7 +185,7 @@ export default {
                 if (this.timer) {
                     clearTimeout(this.timer);
                 }
-                if (res.status === 'PROCESSING' || res.status === 'CANCELLED') {
+                if (res.status === 'PROCESSING' || res.status === 'FINISH' || res.status === 'CANCELLED') {
                     this.$dialog
                         .alert({
                             title: '提示',
@@ -262,6 +262,11 @@ export default {
                                             this.$nextTick(() => {
                                                 document.getElementById('pay').click();
                                             });
+
+                                            this.$toast.loading({
+                                                message: '加载中...',
+                                                forbidClick: true
+                                            });
                                             this.getOrder(true);
                                         })
                                         .catch(e => {
@@ -279,7 +284,6 @@ export default {
                                         openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y'
                                     })
                                     .then(res => {
-                                        this.getOrder(true);
                                         if ('wx_pub' === this.payChannel) {
                                             console.log('wxPayParams', res);
                                             wx.chooseWXPay({
@@ -301,6 +305,12 @@ export default {
                                             this.$nextTick(() => {
                                                 document.getElementById('pay').click();
                                             });
+
+                                            this.$toast.loading({
+                                                message: '加载中...',
+                                                forbidClick: true
+                                            });
+                                            this.getOrder(true);
                                         }
                                         // console.log({
                                         //     ...res,