// 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
}
}
},