diff --git a/src/pages/thirdApp/happyMall.vue b/src/pages/thirdApp/happyMall.vue index 3cd6782..9080215 100644 --- a/src/pages/thirdApp/happyMall.vue +++ b/src/pages/thirdApp/happyMall.vue @@ -7,16 +7,9 @@ {{ loginError }} - 继续跳转 + 继续跳转 清除缓存并重试 - - - - 您即将离开智慧后勤应用并跳转到第三方应用,请注意个人隐私和账号财产安全。您通过第三方服务页面主动提供给第三方商户的个人信息,相关信息保护责任由第三方商户承担。 - - @@ -31,15 +24,28 @@ 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) show.value = true + if (autoOpenModal) openThirdAppConfirm() return } loginError.value = "登录失败,可点下方清除缓存后重试" @@ -54,7 +60,7 @@ const retryLogin = async () => { clearBizSession({ clearRole: true }) const ok = await recoverBizSession() if (ok) { - show.value = true + openThirdAppConfirm() return } loginError.value = "仍无法登录,请关闭后从工作台重新进入" @@ -91,7 +97,6 @@ const thirdAppJump = async () => { 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 }