11
This commit is contained in:
1 parent
a76f180161
commit
bda66ff5dd
6 files changed
+23
-28
No files matched your search
@@ -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应用
|
||||
|
||||
+2
-2
@@ -523,7 +523,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/thirdApp",
|
||||
"root": "pages/thrid",
|
||||
"pages": [
|
||||
{
|
||||
"path": "happyMall",
|
||||
@@ -753,4 +753,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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":
|
||||
|
||||
@@ -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" },
|
||||
)
|
||||
|
||||
@@ -7,9 +7,16 @@
|
||||
{{ loginError }}
|
||||
</view>
|
||||
<view class="h-100rpx" />
|
||||
<tm-button v-if="!loginError" @click="openThirdAppConfirm">继续跳转</tm-button>
|
||||
<tm-button v-if="!loginError" @click="show = true">继续跳转</tm-button>
|
||||
<tm-button v-else @click="retryLogin">清除缓存并重试</tm-button>
|
||||
</view>
|
||||
|
||||
<tm-modal v-model:show="show" :overlayClick="false" title="注意" position="bottom" height="auto"
|
||||
:showCancel="true" cancelText="取消" confirmText="继续访问" @confirm="thridJump()" @cancel="show = false">
|
||||
<tm-text font-size="30" color="#999999">
|
||||
您即将离开智慧后勤应用并跳转到第三方应用,请注意个人隐私和账号财产安全。您通过第三方服务页面主动提供给第三方商户的个人信息,相关信息保护责任由第三方商户承担。
|
||||
</tm-text>
|
||||
</tm-modal>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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)}` })
|
||||
|
||||
Reference in new issue
Block a user