fix:共富商场适配钉钉

This commit is contained in:
dzc committed 2026-08-21 10:23:08 +08:00
1 parent c7e94097c4
commit 585e5e2f62
3 files changed
+35 -17

No files matched your search

+25
View File
@@ -2,6 +2,31 @@
<html>
<head>
<meta charset="UTF-8" />
<script>
;(function installLegacyRouteCompat() {
function normalizeLegacyRoute() {
var currentHash = window.location.hash
var normalizedHash = currentHash
.replace(/^#\/pages\/third-app(?=\/)/, "#/pages/thirdApp")
.replace(/^#\/third-app(?=\/)/, "#/pages/thirdApp")
.replace(/^#\/thirdApp(?=\/)/, "#/pages/thirdApp")
if (normalizedHash !== currentHash) {
window.__ROUTE_COMPAT__ = { from: currentHash, to: normalizedHash }
console.info("[route-compat]", currentHash, "->", normalizedHash)
window.history.replaceState(
window.history.state,
"",
window.location.pathname + window.location.search + normalizedHash,
)
}
}
window.addEventListener("popstate", normalizeLegacyRoute)
window.addEventListener("hashchange", normalizeLegacyRoute)
normalizeLegacyRoute()
})()
</script>
<script src="https://dapp.tmuyun.com/oss-static/app/jcommind.js"></script>
<script src="https://g.alicdn.com/gdt/jsapi/1.9.55-beta.12/index.js"></script>
<script>
+9 -5
View File
@@ -8,11 +8,15 @@ import tmUi from "./uni_modules/tm-ui"
// #ifdef H5
import VConsole from "vconsole"
import { installZzdNavigateTrack } from "@/sheep/utils/zzd-aplus-track"
if (import.meta.env.VITE_VCONSOLE === "true") {
new VConsole()
}
installZzdNavigateTrack()
// #endif
if (import.meta.env.VITE_VCONSOLE === "true") {
new VConsole()
}
const routeCompat = (window as any).__ROUTE_COMPAT__
if (routeCompat) {
console.info("[route-compat][vconsole]", routeCompat.from, "->", routeCompat.to)
}
installZzdNavigateTrack()
// #endif
export function createApp() {
const app = createSSRApp(App)
+1 -12
View File
@@ -533,17 +533,6 @@
}
]
},
{
"root": "pages/third-app",
"pages": [
{
"path": "happyMall",
"style": {
"navigationBarTitleText": "美好商城"
}
}
]
},
{
"root": "pages/integrated",
"pages": [
@@ -764,4 +753,4 @@
}
]
}
}
}