From bda66ff5dd05732bed8e31f86731c329506560b9 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 20 Aug 2026 20:28:11 +0800 Subject: [PATCH] 11 --- .env | 4 +-- src/pages.json | 4 +-- src/pages/tabbar/index.vue | 6 ++-- src/pages/tabbar/my.vue | 2 +- src/pages/{thirdApp => thrid}/happyMall.vue | 31 +++++++++------------ src/pages/user/userRole.vue | 4 +-- 6 files changed, 23 insertions(+), 28 deletions(-) rename src/pages/{thirdApp => thrid}/happyMall.vue (81%) diff --git a/.env b/.env index 5d0ff5e..0ed20e9 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ # H5:true 时在页面加载 vConsole -VITE_VCONSOLE=true -# VITE_VCONSOLE=false +# VITE_VCONSOLE=true +VITE_VCONSOLE=false #VITE_ZZD_TRACK_DISABLE=true #是否是TOC应用 diff --git a/src/pages.json b/src/pages.json index f87b16d..74d4c07 100644 --- a/src/pages.json +++ b/src/pages.json @@ -523,7 +523,7 @@ ] }, { - "root": "pages/thirdApp", + "root": "pages/thrid", "pages": [ { "path": "happyMall", @@ -753,4 +753,4 @@ } ] } -} \ No newline at end of file +} diff --git a/src/pages/tabbar/index.vue b/src/pages/tabbar/index.vue index 33cd38d..19b5f60 100644 --- a/src/pages/tabbar/index.vue +++ b/src/pages/tabbar/index.vue @@ -118,9 +118,9 @@ const jumpByParam = async () => { } if (await jumpIntegratedSubPage(launchParam)) return switch (launchParam) { - case "thirdApp": + case "thrid": uni.setStorageSync("launchParam", launchParam) - return uni.reLaunch({ url: "/pages/thirdApp/happyMall" }) + return uni.reLaunch({ url: "/pages/thrid/happyMall" }) case "canteen": uni.setStorageSync("launchParam", launchParam) uni.switchTab({ url: "/pages/tabbar/canteen" }) @@ -167,7 +167,7 @@ const jumpByParam = async () => { failBoot("缺少入口参数,请从门户重新进入") return } - if (launchParam == "thirdApp") return uni.reLaunch({ url: "/pages/thirdApp/happyMall" }) + if (launchParam == "thrid") return uni.reLaunch({ url: "/pages/thrid/happyMall" }) switch (userRole) { case "merchant": diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index 49e1077..f782087 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -361,7 +361,7 @@ const initMenuConfig = () => { { text: "dev-外来人员就餐", icon: "/static/icon/service_1.png", path: "/pages/apply/foreign-list" }, { text: "dev-跨单位就餐", icon: "/static/icon/service_1.png", path: "/pages/apply/stride-list" }, { text: "dev-包厢预定", icon: "/static/icon/service_4.png", path: "/pages/boxes/apply-list" }, - { text: "dev-第三方应用", icon: "/static/icon/login.png", path: "/pages/thirdApp/happyMall" }, + { text: "dev-第三方应用", icon: "/static/icon/login.png", path: "/pages/thrid/happyMall" }, { text: "dev-登录", icon: "/static/icon/login.png", path: "/pages/user/login" }, { text: "dev-角色选择", icon: "/static/icon/login.png", path: "/pages/user/userRole" }, ) diff --git a/src/pages/thirdApp/happyMall.vue b/src/pages/thrid/happyMall.vue similarity index 81% rename from src/pages/thirdApp/happyMall.vue rename to src/pages/thrid/happyMall.vue index 9080215..abdae91 100644 --- a/src/pages/thirdApp/happyMall.vue +++ b/src/pages/thrid/happyMall.vue @@ -7,9 +7,16 @@ {{ loginError }} - 继续跳转 + 继续跳转 清除缓存并重试 + + + + 您即将离开智慧后勤应用并跳转到第三方应用,请注意个人隐私和账号财产安全。您通过第三方服务页面主动提供给第三方商户的个人信息,相关信息保护责任由第三方商户承担。 + + @@ -24,28 +31,15 @@ import { clearBizSession, ensureBizLogin, recoverBizSession } from "@@/utils/req // type: "4", // }) +const show = ref(false) const loginError = ref("") -const openThirdAppConfirm = () => { - uni.showModal({ - title: "注意", - content: - "您即将离开智慧后勤应用并跳转到第三方应用,请注意个人隐私和账号财产安全。您通过第三方服务页面主动提供给第三方商户的个人信息,相关信息保护责任由第三方商户承担。", - showCancel: true, - cancelText: "取消", - confirmText: "继续访问", - success: (res) => { - if (res.confirm) void thirdAppJump() - }, - }) -} - const ensureLoginAndMaybeOpen = async (autoOpenModal: boolean) => { loginError.value = "" try { const ok = await ensureBizLogin() if (ok) { - if (autoOpenModal) openThirdAppConfirm() + if (autoOpenModal) show.value = true return } loginError.value = "登录失败,可点下方清除缓存后重试" @@ -60,7 +54,7 @@ const retryLogin = async () => { clearBizSession({ clearRole: true }) const ok = await recoverBizSession() if (ok) { - openThirdAppConfirm() + show.value = true return } loginError.value = "仍无法登录,请关闭后从工作台重新进入" @@ -92,11 +86,12 @@ onLoad(async () => { // } // 确认或拒绝协议 -const thirdAppJump = async () => { +const thridJump = async () => { try { uni.showLoading({ title: "跳转中", mask: true }) const res: any = await merchantApi.lbLogin() if (res.code == 0) { + show.value = false if (!res.data) return uni.showToast({ title: "url错误", icon: "none" }) window.location.href = res.data } diff --git a/src/pages/user/userRole.vue b/src/pages/user/userRole.vue index 7232500..bbd17d4 100644 --- a/src/pages/user/userRole.vue +++ b/src/pages/user/userRole.vue @@ -71,8 +71,8 @@ const relaunchByLaunchParam = () => { return uni.reLaunch({ url: "/pages/tabbar/integrated" }) case "cabinet": return uni.reLaunch({ url: "/pages/tabbar/cabinet" }) - case "thirdApp": - return uni.reLaunch({ url: "/pages/thirdApp/happyMall" }) + case "thrid": + return uni.reLaunch({ url: "/pages/thrid/happyMall" }) default: if (launchParam) { return uni.reLaunch({ url: `/pages/tabbar/index?launchParam=${encodeURIComponent(launchParam)}` })