From 3b8ff7463b70c9f9f5fe2776052fd095a2086c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=85=E6=B0=94=E7=9A=84boy?= <2571613080@qq.com> Date: Tue, 3 Mar 2026 09:40:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E5=A2=9E=E5=8A=A0=E6=94=AF=E6=8C=81=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=89=B9=E9=87=8F=E4=B8=8B?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages-user/pages/add-card/index.vue | 26 +++++++++++++++++-------- src/pages/home/index.vue | 20 +++++++++---------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/pages-user/pages/add-card/index.vue b/src/pages-user/pages/add-card/index.vue index db83e7e..7965953 100644 --- a/src/pages-user/pages/add-card/index.vue +++ b/src/pages-user/pages/add-card/index.vue @@ -60,15 +60,25 @@ export default { }) console.log('handleSuccess', res) - await uni.showToast({ - icon: 'none', - title: 'The credit card was added successfully.' - }) - // const eventChannel = this.getOpenerEventChannel(); - // const id = res.data - // eventChannel.emit('acceptDataFromOpenedPage', {...params, id}); - setTimeout(uni.navigateBack, 1000) + const code = res?.data?.code ?? res?.code + const msg = res?.data?.msg ?? res?.msg + if (code === 200) { + await uni.showToast({ + icon: 'none', + title: 'The credit card was added successfully.' + }) + setTimeout(uni.navigateBack, 1000) + } else { + await uni.showToast({ + icon: 'none', + title: msg || 'Add credit card failed' + }) + } } catch (e) { + uni.showToast({ + icon: 'none', + title: e?.message || e?.data?.msg || 'Add credit card failed' + }) } }, diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue index 92d155d..2027771 100644 --- a/src/pages/home/index.vue +++ b/src/pages/home/index.vue @@ -469,16 +469,16 @@ function getInviteInfo() { } }); - // 获取支付相关配置 - getDictFineList({ - dictType: "app_config", - }).then((res) => { - res.data.map((item) => { - if (item.dictValue === "stripeKey") { - Config.stripeKey = item.remark; - } - }); - }); + // 获取支付相关配置(已去掉 stripeKey 覆盖,统一用 config/index.ts 里的 pk_live_ 跑通流程) + // getDictFineList({ + // dictType: "app_config", + // }).then((res) => { + // res.data.map((item) => { + // if (item.dictValue === "stripeKey") { + // Config.stripeKey = item.remark; + // } + // }); + // }); } }