From 2a93afc95dda6afd1479af042e178b3e84a0c8c4 Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期四, 13 六月 2024 14:03:36 +0800
Subject: [PATCH] feat(支付): 修改接口统一前缀

---
 pages/pay/discountpay.vue |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/pages/pay/discountpay.vue b/pages/pay/discountpay.vue
index 15038c8..59773f7 100644
--- a/pages/pay/discountpay.vue
+++ b/pages/pay/discountpay.vue
@@ -120,6 +120,7 @@
 		queryUseSweepPayCoupon,
 		getWechatConfigInfo,
 		saveWxOrder,
+    saveOrder,
 		tlPay
 	} from '@/common/api/index'
 	import wx from 'weixin-js-sdk'; // 浣跨敤js-sdk
@@ -244,7 +245,10 @@
 		onLoad(opt) {
 			this.isNew = uni.getStorageSync('IS_NEW')
 			this.cid = uni.getStorageSync('CID')
-			this.discountInfo = uni.getStorageSync('DISCOUNT_INFO')
+      if(uni.getStorageSync('DISCOUNT_INFO')){
+        this.discountInfo = uni.getStorageSync('DISCOUNT_INFO')
+      }
+
 			const token = uni.getStorageSync(ACCESSTOKEN) || null
 			if (opt.shopInfo) {
 				this.shopInfo = JSON.parse(decodeURIComponent(opt.shopInfo))
@@ -258,6 +262,7 @@
 			if (opt.money) {
 				this.money = parseFloat(opt.money).toFixed(2)
 				let dis = this.money * 100 * (1 - this.discountInfo.shopDiscount)
+        console.log('dis',dis)
 				let money = parseInt((this.money * 100 * this.discountInfo.shopDiscount))
 				if (dis < 1) {
 					money = parseInt((this.money * 100))
@@ -332,7 +337,7 @@
 				if (this.payWay == 3) {
 					params.bankCardId = this.bankCardId
 				}
-				saveWxOrder(params).then(res => {
+        saveOrder(params).then(res => {
 					uni.hideLoading()
 					try {
 						this.orderId = res.orderId

--
Gitblit v1.9.1