跟上面参照链接里的问题一样,说是非单页面应用会出现这种问题,所以uni-app发行的h5不是单页面应用???
- 发布:2022-06-27 15:34
- 更新:2023-12-29 10:48
- 阅读:485
提供一个在线地址
-
7***@qq.com (作者)
http://www.yunqi.art/
发现是路由方式的问题,hash模式就正常,history就会有问题,链接是history模式2022-06-29 16:32
我也遇到了同样的问题,在其它网站看到了同样是history模式的webApp,在html页引入一个manifest可以解决
https://developer.mozilla.org/zh-CN/docs/Web/Manifest
{
"theme_color": "#18197D",
"background_color": "#18197D",
"display": "standalone",
"scope": "/",
"start_url": "/",
"name": "文字",
"short_name": "文字",
"description": "文字",
"icons": [
{
"src": "/static/logo.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
}
]
}
-
有更详细的内容吗
我目前这样写的,还是只有添加时的页面才有全屏展示,跳转路由后就不行了
<link rel="manifest" href="webmanifest.json" />
{
"theme_color": "#12102e",
"background_color": "#12102e",
"display": "standalone",
"scope": "/",
"start_url": "/",
"name": "文字",
"short_name": "文字",
"description": "文字",
"icons": [
{
"src": "/static/favicon.ico",
"sizes": "144x144",
"type": "image/png",
"purpose": "any"
}
]
}
2024-08-29 17:59
7***@qq.com (作者)
我用的是uni-app写的
2022-06-29 16:30