This commit is contained in:
zjf committed 2026-05-08 22:46:40 +08:00
1 parent 22e0aaf610
commit 4df8ee27da
2 files changed
+18 -3

No files matched your search

+13 -2
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { APPENV } from "@/sheep/constant"
import { getAppInfo, getLaunchParam, isDevEnv } from "@/sheep/utils/app"
import { getAppInfo, getLaunchParam, getUrlQueryParam, isDevEnv } from "@/sheep/utils/app"
import { onShow } from "@dcloudio/uni-app"
const moduleList = [
@@ -61,7 +61,10 @@ const moduleList = [
]
onShow(() => {
uni.removeStorageSync("launchParam")
const fromUrl = getUrlQueryParam("launchParam")
if (fromUrl) {
uni.setStorageSync("launchParam", fromUrl)
}
jumpByParam()
})
@@ -75,6 +78,9 @@ const jumpByParam = async () => {
const zzdR = await tryZzdEntryLogin()
if (zzdR !== "ok") return
switch (launchParam) {
case "thirdApp":
uni.setStorageSync("launchParam", launchParam)
return uni.reLaunch({ url: "/pages/thirdApp/happyMall" })
case "canteen": // 食堂
uni.setStorageSync("launchParam", launchParam)
uni.switchTab({ url: "/pages/tabbar/canteen" })
@@ -104,6 +110,11 @@ const jumpByParam = async () => {
uni.switchTab({ url: "/pages/tabbar/prosperityShopMchList" })
break
default:
if (!launchParam) {
uni.showToast({ title: "缺少入口参数,请从工作台重新进入", icon: "none", duration: 3500 })
} else {
uni.showToast({ title: "暂不支持的入口:" + launchParam, icon: "none", duration: 3500 })
}
uni.hideTabBar()
break
}