From aa7baa23e001c88dc09189ad98dd4fc23f672418 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Wed, 11 Dec 2024 21:52:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E7=BA=BF?= =?UTF-8?q?=E4=B8=8B=E6=94=AF=E4=BB=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order_details.vue | 37 +++++++++++++++++++++++++--- pages/shopping_cart/submit_order.vue | 35 +++++++++++++++++++++++--- setting.js | 22 +++++++++++++++++ 3 files changed, 88 insertions(+), 6 deletions(-) diff --git a/pages/order_details.vue b/pages/order_details.vue index f934e90..c1ab851 100644 --- a/pages/order_details.vue +++ b/pages/order_details.vue @@ -96,8 +96,39 @@ " >
商品金额
-
¥{{ orderData.goods_money }}
+
¥{{ orderData.pay.total_money }}
+ +
+
已付金额
+
¥{{ orderData.pay.received_money }}
+
+
+
未付金额
+
¥{{ orderData.pay.pay_money }}
+
+ +
-
实付金额
+
总计金额
¥{{ orderData.order_money }}
@@ -192,7 +223,7 @@
-
申请售后
+
申请售后
确定收货
提醒发货
diff --git a/pages/shopping_cart/submit_order.vue b/pages/shopping_cart/submit_order.vue index 6e99037..729231f 100644 --- a/pages/shopping_cart/submit_order.vue +++ b/pages/shopping_cart/submit_order.vue @@ -84,9 +84,9 @@ :model="paymentForm" label-width="150px" > - - - + + + { + if (res.code == 0){ + //找到支付信息-发起余额支付 + let _payData = { + out_trade_no: res.data.out_trade_no, + pay_type: 'BALANCE',//余额支付 + return_url: '', + is_balance: 1 + } + //请求支付接口-完成余额支付 + this.$axios.post(`/pay/pay`, _payData).then((res2) => { + if (res2.code == 0){ + this.paymentDialog = false; + this.$router.push("/order"); //支付成功跳转订单列表页面 + }else{ + this.$message.error(res.message); + } + }) + }else{ + //未找到支付信息 + this.$message.error(`未找到支付信息`); + } + // this.paymentDialog = false; + // this.$router.push("/order"); //支付成功跳转订单列表页面 + }); } //this.paymentDialog = false; //this.$router.push("/order"); //支付成功跳转订单列表页面 diff --git a/setting.js b/setting.js index b4134a0..d90d640 100644 --- a/setting.js +++ b/setting.js @@ -1,6 +1,8 @@ // 请求接口地址 如果没有配置自动获取当前网址路径 // https://cbtadmin.jtyqt.com 正式地址 // https://yaochangtest.first.xinzhidi.cn/ 测试地址 + +/* 正式环境 const VUE_APP_API_URL = `${'https://cbtadmin.jtyqt.com'}/api`; const VUE_APP_API_COUPON_URL = `${'https://cbtadmin.jtyqt.com'}`; const VUE_APP_WS_URL = `ws:${'https://cbtadmin.jtyqt.com'}/ws`; @@ -8,6 +10,26 @@ const VUE_APP_WS_URL = `ws:${'https://cbtadmin.jtyqt.com'}/ws`; const VUE_UPLOD_URL = ``; const VUE_KF_URL = `${'https://yaochangkf.three.xinzhidi.cn'}`; const VUE_APP_DOWNLOAD= `${'http://publish.jtyqt.com/4vsqhr'}` +*/ + + +//本地测试环境 +const VUE_APP_API_URL = `${'http://devzhiyao.zeyan.wang'}/api`; +const VUE_APP_API_COUPON_URL = `${'http://devzhiyao.zeyan.wang'}`; +const VUE_APP_WS_URL = `ws:${'http://devzhiyao.zeyan.wang'}/ws`; +// const VUE_UPLOD_URL = `${'http://devzhiyao.zeyan.wang'}/`; +const VUE_UPLOD_URL = ``; +const VUE_KF_URL = `${'https://yaochangkf.three.xinzhidi.cn'}`; +const VUE_APP_DOWNLOAD= `${'http://publish.jtyqt.com/4vsqhr'}` + +//线上测试环境 +// const VUE_APP_API_URL = `${'https://yaochangtest.first.xinzhidi.cn'}/api`; +// const VUE_APP_API_COUPON_URL = `${'https://yaochangtest.first.xinzhidi.cn'}`; +// const VUE_APP_WS_URL = `ws:${'https://yaochangtest.first.xinzhidi.cn'}/ws`; +// // const VUE_UPLOD_URL = `${'https://yaochangtest.first.xinzhidi.cn'}/`; +// const VUE_UPLOD_URL = ``; +// const VUE_KF_URL = `${'https://yaochangkf.three.xinzhidi.cn'}`; +// const VUE_APP_DOWNLOAD= `${'http://publish.jtyqt.com/4vsqhr'}` const Setting = { // 接口请求地址