router.beforeEach((to, from, next) => {
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isiOS && to.path!==location.pathname){
location.assign(to.fullPath)
}
next()
})
再次更新 笨方法解决苹果返回白屏问题
router.beforeEach((to, from, next) => {
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isiOS && to.path!==location.pathname){
location.assign(to.fullPath)
}
setTimeout(() => {
next()
}, 100);
})