Vueプロジェクトは微信共有の常にトップページのバグを解決する
905 ワード
//app.vue
watch: {
$route: {
immediate:
true
,
deep:
true
,
handler(to) {
//
const WECHAT_BROWSER = navigator.userAgent.toLowerCase().includes(
'micromessenger'
)
// iOS , ,query
if
(WECHAT_BROWSER) {
// eslint-disable-next-line
window.location.href = window.location.href
}
}
},
https://xxx.com/?menu#/goods