瀏覽代碼

修改应付金额及0元页面跳转问题

秦鹏 3 年之前
父節點
當前提交
25cc1f4b75
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/components/common/Payment.vue

+ 6 - 2
src/components/common/Payment.vue

@@ -94,14 +94,18 @@ export default {
       let Mnam = "order-order_manager-PayMyOrder";
       getLearnWebContent(Mnam, {
         id: this.orderNumber, //商品id
-        pay_money: item.price, //实际入账金额,由易支付成功返回
+        pay_money: this.data.receivables_money, //实际入账金额,由易支付成功返回
         bank_transaction_sn: "", //银行交易流水号,由易支付成功返回
       })
         .then((res) => {
           //this.loading = false;
           this.judgePayResult(true);
           // 调取支付接口
-          window.location.href = res.pay_page_url;
+          if (!res.pay_page_url && item.price == 0) {
+            window.location.href = "/GCLS-Personal/#/OrderPaySuccess";
+          } else {
+            window.location.href = res.pay_page_url;
+          }
         })
         .catch((error) => {
           this.loading = false;