From 0bec4a30b383c51e1d3243dca3b76a373a61a2af Mon Sep 17 00:00:00 2001 From: duanshuwen Date: Thu, 7 Aug 2025 22:49:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E4=BA=A4=E4=BA=92=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/index.vue | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/pages/goods/index.vue b/pages/goods/index.vue index 24bef51..bca105d 100644 --- a/pages/goods/index.vue +++ b/pages/goods/index.vue @@ -153,24 +153,20 @@ const handleConfirmOrder = async (orderData) => { console.log("确认订单---2:", res); // 仅作为示例,非真实参数信息。 - // uni.requestPayment({ - // provider: "wxpay", - // timeStamp: String(Date.now()), - // nonceStr: "A1B2C3D4E5", - // package: "prepay_id=wx20180101abcdefg", - // signType: "MD5", - // paySign: "", - // success: (res) => { - // console.log("success:" + JSON.stringify(res)); - // }, - // fail: (err) => { - // console.log("fail:" + JSON.stringify(err)); - // }, - // }); - - uni.showToast({ - title: "订单确认成功", - icon: "success", + uni.requestPayment({ + provider: "wxpay", + ...res.data, + success: (res) => { + console.log("success:" + JSON.stringify(res)); + uni.showToast({ + title: "支付成功", + icon: "success", + duration: 2000, + }); + }, + fail: (err) => { + console.log("fail:" + JSON.stringify(err)); + }, }); };