From 587858fc74f1db1fb4a8beceb38da11975bb85fe Mon Sep 17 00:00:00 2001 From: weiwei Date: Thu, 17 Apr 2025 14:34:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E8=83=BD=E6=9F=9C=E5=BC=80=E9=97=A8?= =?UTF-8?q?=E6=8B=92=E7=BB=9D=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 7 + src/pages/cabinet/buy.vue | 13 +- .../tm-collapse-item/tm-collapse-item.vue | 2 +- .../components/tm-collapse/tm-collapse.vue | 151 +++++++++--------- 4 files changed, 92 insertions(+), 81 deletions(-) diff --git a/src/pages.json b/src/pages.json index be1859c..a2b99c1 100644 --- a/src/pages.json +++ b/src/pages.json @@ -328,6 +328,13 @@ "navigationBarTitleText": "选择支付方式", "disableScroll": true } + }, + { + "path": "cabinetList", + "style": { + "navigationBarTitleText": "智能柜列表", + "disableScroll": true + } } ] }, diff --git a/src/pages/cabinet/buy.vue b/src/pages/cabinet/buy.vue index ca08653..0f7d6b4 100644 --- a/src/pages/cabinet/buy.vue +++ b/src/pages/cabinet/buy.vue @@ -82,7 +82,8 @@ height="800rpx" cancelText="拒绝" confirmText="同意" - @confirm="appAuthHardDoorConfirm" + @confirm="appAuthHardDoor(1)" + @cancel="appAuthHardDoor(0)" > {{ state.authDesc }} @@ -166,16 +167,16 @@ const openDoor = async () => { // 支付方式tab改变 const payMethodTabChange = (e: number) => {} -// 确认协议 -const appAuthHardDoorConfirm = async () => { +// 确认或拒绝协议 +const appAuthHardDoor = async (type: 1 | 0) => { try { - uni.showLoading({ title: "授权中", mask: true }) + uni.showLoading({ title: type ? "授权中" : "加载中", mask: true }) const res = await hardApi.appAuthHardDoor({ authId: state.authId, - authStatus: 1, + authStatus: type ? 1 : 0, }) if (res.code == 0) { - uni.showToast({ title: "授权成功", icon: "none" }) + if (type) uni.showToast({ title: "授权成功", icon: "none" }) state.show = false } } catch (error: any) { diff --git a/src/uni_modules/tm-ui/components/tm-collapse-item/tm-collapse-item.vue b/src/uni_modules/tm-ui/components/tm-collapse-item/tm-collapse-item.vue index 783ac51..c740aca 100644 --- a/src/uni_modules/tm-ui/components/tm-collapse-item/tm-collapse-item.vue +++ b/src/uni_modules/tm-ui/components/tm-collapse-item/tm-collapse-item.vue @@ -1,5 +1,5 @@ - \ No newline at end of file +