From 292a74351e5cbe907eb47b1d4a2cdd748fbceeea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com>
Date: Thu, 25 Sep 2025 15:57:59 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E7=BC=B4=E8=B4=B9=E6=9C=AA?=
=?UTF-8?q?=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F=E7=9A=84=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/community.js | 2 +
packages/community/propertyPayment/index.vue | 68 ++++++++++----------
2 files changed, 36 insertions(+), 34 deletions(-)
diff --git a/api/community.js b/api/community.js
index 054cd2b4..ac6172ff 100644
--- a/api/community.js
+++ b/api/community.js
@@ -52,4 +52,6 @@ export const apiArr = {
tradeQuery: "/api/v2/wechat/community-order-pay/trade-query", //缴费查单
checkComm: "/api/v2/wechat/community/check-comm", //检查小区是否属于当前用户
+
+ delPay: "/api/v2/wechat/community-order-pay/del", //检查小区是否属于当前用户
};
diff --git a/packages/community/propertyPayment/index.vue b/packages/community/propertyPayment/index.vue
index 9a99dc86..f44fae20 100644
--- a/packages/community/propertyPayment/index.vue
+++ b/packages/community/propertyPayment/index.vue
@@ -138,7 +138,7 @@
合计
¥
- {{ currentMoney.toFixed(2) }}
+ {{ currentMoney }}
立即支付
@@ -486,42 +486,42 @@ export default {
await request(apiArr.OrderPay, "POST", { order_pay_id: this.payInfoId }).then(
async (res) => {
if (res && res.timeStamp && res.nonceStr && res.package && res.signType && res.paySign) {
- // 调用微信支付
- uni.requestPayment({
- timeStamp: res.timeStamp,
- nonceStr: res.nonceStr,
- package: res.package,
- signType: res.signType,
- paySign: res.paySign,
- success: (payRes) => {
- const params = {
- order_pay_id: this.payInfoId,
- }
- request(apiArr.tradeQuery, "POST", params).then(res => {
- })
- },
- fail: (payErr) => {
- uni.showToast({
- title: payErr.errMsg == 'requestPayment:fail cancel' ? '已取消支付' : '支付失败',
- icon: 'none'
- })
- const params = {
- order_ids: orderId,
- }
- request(apiArr.cancelPay, "POST", params).then(res => {
- })
- },
- complete: () => {
- // 支付完成后的回调,无论成功失败都会执行
- }
+ // 调用微信支付
+ uni.requestPayment({
+ timeStamp: res.timeStamp,
+ nonceStr: res.nonceStr,
+ package: res.package,
+ signType: res.signType,
+ paySign: res.paySign,
+ success: (payRes) => {
+ const params = {
+ order_pay_id: this.payInfoId,
+ }
+ request(apiArr.tradeQuery, "POST", params).then(res => {
})
- } else {
- console.error("获取支付参数失败,缺少必要参数")
+ },
+ fail: (payErr) => {
uni.showToast({
- title: '获取支付信息失败',
- icon: 'none'
+ title: payErr.errMsg == 'requestPayment:fail cancel' ? '已取消支付' : '支付失败',
+ icon: 'none'
})
- }
+ const params = {
+ order_pay_id: this.payInfoId,
+ }
+ request(apiArr.delPay, "POST", params).then(res => {
+ })
+ },
+ complete: () => {
+ // 支付完成后的回调,无论成功失败都会执行
+ }
+ })
+ } else {
+ console.error("获取支付参数失败,缺少必要参数")
+ uni.showToast({
+ title: '获取支付信息失败',
+ icon: 'none'
+ })
+ }
}
);
},