fix(h5): 设置路由基础路径为根目录

将h5路由的基础路径配置为根目录,确保部署时路径正确。同时在manifest.json和manifest.config.ts中同步此配置,并更新相关文档链接。
This commit is contained in:
feige996
2025-08-15 09:57:18 +08:00
parent c8e58795fd
commit 5f442e0ed9
3 changed files with 5 additions and 2 deletions

1
env/.env vendored
View File

@@ -5,6 +5,7 @@ VITE_UNI_APPID = '__UNI__D1E5001'
VITE_WX_APPID = 'wxa2abb91f64032a2b'
# h5部署网站的base配置到 manifest.config.ts 里的 h5.router.base
# https://uniapp.dcloud.net.cn/collocation/manifest.html#h5-router
VITE_APP_PUBLIC_BASE=/
# 登录页面

View File

@@ -30,7 +30,7 @@ export default defineManifestConfig({
'locale': VITE_FALLBACK_LOCALE, // 'zh-Hans'
'h5': {
router: {
// base: VITE_APP_PUBLIC_BASE,
base: VITE_APP_PUBLIC_BASE,
},
},
/* 5+App特有相关 */

View File

@@ -109,6 +109,8 @@
},
"vueVersion": "3",
"h5": {
"router": {}
"router": {
"base": "/"
}
}
}