From 92453fb420e29477390bf5bd544d4335c0116df7 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Tue, 12 Mar 2024 17:15:37 +0800
Subject: [PATCH] =?UTF-8?q?404=E9=A1=B5=E9=9D=A2=20=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E5=9B=BE=E4=B9=A6=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/store/modules/permission.js | 5 ++
src/views/404.vue | 9 ++--
src/views/system/workerComponents/book.vue | 2 +-
.../system/workerComponents/bookBorrow.vue | 3 +-
.../system/workerComponents/quickMenu.vue | 5 +-
src/views/system/workerComponents/toDo.vue | 54 +++++++++----------
6 files changed, 38 insertions(+), 40 deletions(-)
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index e83799e..f6bf3c2 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -238,6 +238,11 @@ const actions = {
} else {
accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
}
+ accessedRoutes.push({
+ path: '*',
+ redirect: '/404',
+ hidden: true
+ })
commit('SET_ROUTES', accessedRoutes)
resolve(accessedRoutes)
diff --git a/src/views/404.vue b/src/views/404.vue
index 1791f55..42cec6c 100644
--- a/src/views/404.vue
+++ b/src/views/404.vue
@@ -9,12 +9,9 @@
OOPS!
-
{{ message }}
-
Please check that the URL you entered is correct, or click the button below to return to the homepage.
-
Back to home
+
请检查您输入的网址是否正确,或者单击下面的按钮返回主页。
+
返回首页
@@ -26,7 +23,7 @@ export default {
name: 'Page404',
computed: {
message() {
- return 'The webmaster said that you can not enter this page...'
+ return '无法进入这个页面...'
}
}
}
diff --git a/src/views/system/workerComponents/book.vue b/src/views/system/workerComponents/book.vue
index a18a448..80d9dc4 100644
--- a/src/views/system/workerComponents/book.vue
+++ b/src/views/system/workerComponents/book.vue
@@ -70,7 +70,7 @@ export default {
async getToken () {
if(/^\/system/.test(this.$route.path)) return
const token = await httpCurl({
- auth_token: this.$store.state.user.authToken
+ auth_token: this.$store.getters.oa_token
},true,"","POST",`${process.env['VUE_APP_OUT_Book']}/api/admin/auth/oss-login`)
this.token = token.access_token
},
diff --git a/src/views/system/workerComponents/bookBorrow.vue b/src/views/system/workerComponents/bookBorrow.vue
index 90f6221..356c87f 100644
--- a/src/views/system/workerComponents/bookBorrow.vue
+++ b/src/views/system/workerComponents/bookBorrow.vue
@@ -69,8 +69,7 @@ export default {
if (/^\/system/.test(this.$route.path)) return;
const token = await httpCurl(
{
- id: this.$store.state.user.userId,
- username: this.$store.state.user.username,
+ auth_token: this.$store.getters.oa_token
},
true,
"",
diff --git a/src/views/system/workerComponents/quickMenu.vue b/src/views/system/workerComponents/quickMenu.vue
index cd0e75c..d40a6ae 100644
--- a/src/views/system/workerComponents/quickMenu.vue
+++ b/src/views/system/workerComponents/quickMenu.vue
@@ -135,7 +135,8 @@