From 4e2299f553386171282102464ef8dc81bd78e2c2 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Wed, 15 Jan 2025 11:43:13 +0800
Subject: [PATCH] 1
---
src/permission.js | 2 +-
src/views/preview/index.vue | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/permission.js b/src/permission.js
index dd8c1aa..0a47382 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -48,7 +48,7 @@ router.beforeEach(async(to, from, next) => {
}
if (store.state.permission.addRoutes && store.state.permission.addRoutes instanceof Array && store.state.permission.addRoutes.length > 0) {
- if (to.path === '/sql/index' && store.state.user.name !== '管理员') {
+ if (to.path === '/sql/index' && store.state.user.adminId !== 1) {
next(from.path)
return
}
diff --git a/src/views/preview/index.vue b/src/views/preview/index.vue
index 81c7eac..05f79f3 100644
--- a/src/views/preview/index.vue
+++ b/src/views/preview/index.vue
@@ -8,7 +8,7 @@
-
+
@@ -72,6 +72,8 @@ export default {
this.url = window.decodeURIComponent(this.$route.query.url ?? '')
}
this.type = this.$route.query.type || this.url.split('.').at(-1)
+ if (this.type === 'pdf') {
+ }
}
}
}