Vue点击浏览器刷新后页面会先到首页闪一下再回到当前页面。

路由设置:
const router = new Router({
mode: ‘history’,
base: process.env.BASE_URL,
scrollBehavior(to, from, savedPosition) {
let positionOjb = savedPosition ? savedPosition : { x: 0, y: 0 };
if (isMobile) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(positionOjb);
// autoContentScrollTop star
/let pageContent = document.querySelector(’.publicPageContent’),
needAutoScrollTop = [‘message’, ‘report’, ‘userProfile’, ‘timeLine’].indexOf(to.name) > -1 ? false : true;
pageContent && needAutoScrollTop ? pageContent.scrollTop = parseInt(to.meta.scrollTop) : ‘’;
/
// autoContentScrollTop end
}, 500)
})
} else {
return positionOjb
}
}
});

nginx服务器配置:
server {
listen 8000;
server_name de4.xxx.com;

    location / {
        root   /home/bert/irm/;
        try_files $uri $uri/ /index.html;
        index  index.html index.html;
    }

    add_header Access-Control-Allow-Origin *;

    error_page   500 502 503 504  /50x.html;
   
    location = /50x.html {
        root   /home/bert/irm/;
    }
}

网速快的时候无法重现, chrome偶尔会出现,firefox基本上会一直出现此问题,请问有遇到过的吗?如何解决。