panhui 3 лет назад
Родитель
Сommit
05f8a003b2
3 измененных файлов с 62 добавлено и 0 удалено
  1. 20 0
      src/views/Givesubmit.vue
  2. 21 0
      src/views/activity/Submit.vue
  3. 21 0
      src/views/auction/Submit.vue

+ 20 - 0
src/views/Givesubmit.vue

@@ -401,6 +401,26 @@ export default {
                         .catch(e => {
                             this.$toast(e.error || '支付失败');
                         });
+                } else if (this.payType === 'ALI') {
+                    this.$http
+                        .get('/payOrder/v2/gift/ali', { id: this.orderId, companyId: this.companyId })
+                        .then(res => {
+                            this.hrefUrl = res;
+                            this.$nextTick(() => {
+                                document.getElementById('pay').click();
+                            });
+
+                            this.$toast.loading({
+                                message: '加载中...',
+                                forbidClick: true
+                            });
+                            this.getOrder(true);
+                        })
+                        .catch(e => {
+                            if (e.error) {
+                                this.$toast(e.error);
+                            }
+                        });
                 }
             });
         }

+ 21 - 0
src/views/activity/Submit.vue

@@ -436,6 +436,27 @@ export default {
                                 this.tradeCode = '';
                                 this.$toast(e.error || '支付失败');
                             });
+                    } else if (this.payType === 'ALI') {
+                        this.$http
+                            .get('/payOrder/v2/mint/ali', { id: this.orderId, companyId: this.companyId })
+                            .then(res => {
+                                this.$toast.clear();
+                                this.hrefUrl = res;
+                                this.$nextTick(() => {
+                                    document.getElementById('pay').click();
+                                });
+
+                                this.$toast.loading({
+                                    message: '加载中...',
+                                    forbidClick: true
+                                });
+                                this.getOrder(true);
+                            })
+                            .catch(e => {
+                                if (e.error) {
+                                    this.$toast(e.error);
+                                }
+                            });
                     }
                 });
             } else {

+ 21 - 0
src/views/auction/Submit.vue

@@ -504,6 +504,27 @@ export default {
                                 this.tradeCode = '';
                                 this.$toast(e.error || '支付失败');
                             });
+                    } else if (this.payType === 'ALI') {
+                        this.$http
+                            .get('/payOrder/v2/auction/ali', { id: this.orderId, companyId: this.companyId })
+                            .then(res => {
+                                this.$toast.clear();
+                                this.hrefUrl = res;
+                                this.$nextTick(() => {
+                                    document.getElementById('pay').click();
+                                });
+
+                                this.$toast.loading({
+                                    message: '加载中...',
+                                    forbidClick: true
+                                });
+                                this.getOrder(true);
+                            })
+                            .catch(e => {
+                                if (e.error) {
+                                    this.$toast(e.error);
+                                }
+                            });
                     }
                 });
             } else {