diff --git a/env/.env b/env/.env index d9bff94..e235122 100644 --- a/env/.env +++ b/env/.env @@ -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=/ # 登录页面 diff --git a/manifest.config.ts b/manifest.config.ts index 6f3c7d9..ce33f2c 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -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特有相关 */ diff --git a/src/manifest.json b/src/manifest.json index c436de6..b233c23 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -109,6 +109,8 @@ }, "vueVersion": "3", "h5": { - "router": {} + "router": { + "base": "/" + } } } \ No newline at end of file