md功能实现

This commit is contained in:
simple321vip
2022-04-12 00:12:35 +08:00
parent fc2aa9d22b
commit 1c8c8264c2
6 changed files with 103 additions and 15 deletions
+6 -2
View File
@@ -15,13 +15,13 @@ app.use(router)
app.use(ElementPlus)
app.use(store)
import { getToken } from './utils/auth'
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
blog_id: url.split("=")[1]
}
router.push({
path: '/feedback',
@@ -30,6 +30,10 @@ if (url != 'http://localhost:3000/' && url.search("blog=") != -1) {
}
router.beforeEach((to, from, next) => {
console.log(to.path, from.path)
if (to.path === '/login') {
next()
}
if (whiteList.includes(to.path)) {