新增空白页中转

This commit is contained in:
liaozetao
2023-10-17 14:42:35 +08:00
parent 474bbbb999
commit 121973fae1
4 changed files with 27 additions and 6 deletions

View File

@@ -16,5 +16,4 @@ export default {
} }
</script> </script>
<style scoped> <style scoped></style>
</style>

View File

@@ -12,6 +12,11 @@ const routes = [
path: '/home', path: '/home',
name: 'home', name: 'home',
component: HomeView component: HomeView
},
{
path: '/blank',
name: 'blank',
component: import('../views/BlankView.vue')
} }
] ]

20
src/views/BlankView.vue Normal file
View File

@@ -0,0 +1,20 @@
<template>
<div></div>
</template>
<script>
import router from '@/router';
export default {
name: 'BlankView',
created() {
if (window.performance.navigation.type != window.performance.navigation.TYPE_RELOAD) {
window.location.reload();
} else {
router.push('/home');
}
}
}
</script>
<style scoped></style>

View File

@@ -119,10 +119,7 @@ export default {
adminId: array[0], adminId: array[0],
username: res.username username: res.username
}); });
//处理css样式污染问题关闭当前窗口重新渲染 router.push("/blank");
window.close();
window.open('#/home', '_blank');
//router.push("/home");
}); });
} else { } else {
if (data.msg == "4003" || data.msg == "404") { if (data.msg == "4003" || data.msg == "404") {