diff --git a/src/main.ts b/src/main.ts index 5261aa0..9944c5f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -47,7 +47,7 @@ async function checktoken(url: string) { }) return } - if (url.search("home") != -1) { + if (url.search("/home/") != -1) { let arr = url.split('?') let parameters = arr[1].split('&') let query_data: { [key: string]: any } = {} @@ -66,7 +66,10 @@ async function checktoken(url: string) { }); window.open(href, '_self'); }).catch((error) => { - console.log(error) + const { href } = router.resolve({ + path: '/login' + }); + window.open(href, '_self'); }) } if (url.search("sorryPage") != -1) { diff --git a/src/view/blog/createBlog.vue b/src/view/blog/createBlog.vue index 05a1a0d..62fa56a 100644 --- a/src/view/blog/createBlog.vue +++ b/src/view/blog/createBlog.vue @@ -265,8 +265,8 @@ const onclickTypeTab = (order: number) => { const onclickBlogTab = (blog: Blog) => { deleteBtName.value = "" getContent(blog.bid).then(response => { - blogTypes[checkedBlogIndex.value].blogs[checkedIndex.value].content = response.data.content checkedIndex.value = blog.order + blogTypes[checkedBlogIndex.value].blogs[checkedIndex.value].content = response.data.content copy(current_blog, blog) updated.value = true }).catch(() => {