Compare commits
2 Commits
5f188c748e
...
bd76fea1ec
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bd76fea1ec | ||
![]() |
0a26ce660c |
@@ -6,7 +6,24 @@
|
|||||||
<script>
|
<script>
|
||||||
import Navbar from "../components/Navbar.vue";
|
import Navbar from "../components/Navbar.vue";
|
||||||
import userlist from "../components/userlist.vue";
|
import userlist from "../components/userlist.vue";
|
||||||
|
import axios from "axios";
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {Navbar,userlist},
|
components: {Navbar,userlist},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
axios.get('/api/v1/user/users').catch(function (error) {
|
||||||
|
if (error.response.status === 400) {
|
||||||
|
ElNotification.error({
|
||||||
|
title: '错误',
|
||||||
|
message: '请先登录',
|
||||||
|
duration: 0,
|
||||||
|
});
|
||||||
|
window.location.href = '/login';
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user