diff --git a/pages/future/future.vue b/pages/future/future.vue index 3f31f45..8e91fd4 100644 --- a/pages/future/future.vue +++ b/pages/future/future.vue @@ -92,7 +92,11 @@ 为寺庙建设捐出 - + @@ -165,7 +169,7 @@ export default { donationList: [1, 5, 10], selectedIndex: 0, customAmount: "", - payAmount: "", + payAmount: "100", formedId: null, // 添加 formedId 到 data 中 projectDetails: { @@ -341,7 +345,21 @@ export default { payAmount: this.payAmount, formedId: this.formedId, }); - this.openPaymentUrl(res.data.payParams.payUrl); + if (res.code === 200) { + this.openPaymentUrl(res.data.payParams.payUrl); + } else if (res.code === 10001) { + uni.showModal({ + title: "去实名", + content: "需要实名", + showCancel: true, + confirmText: "yes", + cancelText: "no", + success: function () { + uni.navigateTo({ url: "/pages/realName/realName" }); + }, + }); + console.log("10001", res.msg); + } }, // 封装打开支付链接的方法