From 2fd19fe1496e75fb778bcd1e2fe880d27f3ddecb Mon Sep 17 00:00:00 2001
From: markma <750975972@qq.com>
Date: Fri, 28 Jan 2022 17:04:21 +0800
Subject: [PATCH] =?UTF-8?q?09=20=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/router/index.js | 7 +++++++
src/views/NoAuthority.vue | 29 +++++++++++++++++++++++++++++
src/views/OuterUserIndex.vue | 3 +++
src/views/StudentUserIndex.vue | 2 ++
src/views/TeacherUserIndex.vue | 10 +++++++++-
5 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 src/views/NoAuthority.vue
diff --git a/src/router/index.js b/src/router/index.js
index f299d07..26bfc7a 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -12,6 +12,7 @@ import OuterUserIndex from "../views/OuterUserIndex";
import OuterHistory from "../views/OuterHistory";
import OuterAppForm from "../views/OuterAppForm";
import OuterAppDetail from "../views/OuterAppDetail";
+import NoAuthority from "../views/NoAuthority";
Vue.use(VueRouter)
@@ -84,7 +85,13 @@ const routes = [
component: OuterAppDetail
}
]
+ },
+ {
+ path: '/noAuthority',
+ name: "无权限",
+ component: NoAuthority
}
+
]
const router = new VueRouter({
diff --git a/src/views/NoAuthority.vue b/src/views/NoAuthority.vue
new file mode 100644
index 0000000..fddcbd7
--- /dev/null
+++ b/src/views/NoAuthority.vue
@@ -0,0 +1,29 @@
+
+
+
您没有权限访问该网站,3秒后将返回登录界面!
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/OuterUserIndex.vue b/src/views/OuterUserIndex.vue
index 9d77f02..1211b59 100644
--- a/src/views/OuterUserIndex.vue
+++ b/src/views/OuterUserIndex.vue
@@ -5,6 +5,8 @@
姓名:{{ information.name }}
编号:{{ information.school_id }}
+
+ 出入批准员
@@ -36,6 +38,7 @@ export default {
}
},
created() {
+
const _this = this
diff --git a/src/views/StudentUserIndex.vue b/src/views/StudentUserIndex.vue
index aaa8943..c909821 100644
--- a/src/views/StudentUserIndex.vue
+++ b/src/views/StudentUserIndex.vue
@@ -4,6 +4,8 @@
姓名:{{ information.name }}
编号:{{ information.school_id }}
+
+ 学生
diff --git a/src/views/TeacherUserIndex.vue b/src/views/TeacherUserIndex.vue
index 5fe674c..399e38c 100644
--- a/src/views/TeacherUserIndex.vue
+++ b/src/views/TeacherUserIndex.vue
@@ -6,6 +6,8 @@
姓名:{{ information.name }}
编号:{{ information.school_id }}
+
+ 教师
@@ -41,7 +43,13 @@ export default {
let id = window.location.pathname.split('/')[3];
- axios.get('http://localhost:8181/userDetail/findById/'+id).then(function (resp){
+ let type = window.location.pathname.split('/')[2];
+ axios.get('http://localhost:8181/user/checkUseridAndType/' + id + '/' + type).then(function (resp) {
+ if (resp.data != 'success') {
+ _this.$router.push("/NoAuthority")
+ }
+ })
+ axios.get('http://localhost:8181/userDetail/findById/' + id).then(function (resp) {
_this.information = resp.data
})