博客 window.open() gongasd

This commit is contained in:
simple321vip
2022-04-11 01:01:11 +08:00
parent eb9ffdf27b
commit fc2aa9d22b
8 changed files with 67 additions and 3 deletions
+26
View File
@@ -14,5 +14,31 @@ let app = createApp(App)
app.use(router)
app.use(ElementPlus)
app.use(store)
const whiteList = ['/', '/blog']
let url = window.location.href
console.log(url)
if (url != 'http://localhost:3000/' && url.search("blog=") != -1) {
let blog = {
blog_id: 1
}
router.push({
path: '/feedback',
query: blog
})
}
router.beforeEach((to, from, next) => {
console.log(to.path, from.path)
if (whiteList.includes(to.path)) {
next()
} else {
next()
}
})
app.mount('#app')