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 +