2021-06-07 17:22:07 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="error">
|
|
|
|
|
|
<div class="error-flex">
|
|
|
|
|
|
<div class="left">
|
|
|
|
|
|
<div class="left-item">
|
|
|
|
|
|
<div class="left-item-animation left-item-num">401</div>
|
2021-07-28 18:03:19 +08:00
|
|
|
|
<div class="left-item-animation left-item-title">您未被授权或登录超时,没有操作权限</div>
|
2021-06-07 17:22:07 +08:00
|
|
|
|
<div class="left-item-animation left-item-msg"></div>
|
|
|
|
|
|
<div class="left-item-animation left-item-btn">
|
2021-07-28 18:03:19 +08:00
|
|
|
|
<el-button type="primary" round @click="onSetAuth">重新登录</el-button>
|
2021-06-07 17:22:07 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="right">
|
2023-10-14 00:38:51 +08:00
|
|
|
|
<img src="@/assets/image/401.svg" />
|
2021-06-07 17:22:07 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-12-28 17:21:33 +08:00
|
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
2023-10-14 00:38:51 +08:00
|
|
|
|
import { clearSession } from '@/common/utils/storage';
|
2023-12-28 17:21:33 +08:00
|
|
|
|
import { URL_LOGIN } from '@/router/staticRouter';
|
|
|
|
|
|
|
2021-06-07 17:22:07 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: '401',
|
|
|
|
|
|
setup() {
|
|
|
|
|
|
const router = useRouter();
|
2023-12-28 17:21:33 +08:00
|
|
|
|
const route = useRoute();
|
|
|
|
|
|
|
2021-06-07 17:22:07 +08:00
|
|
|
|
const onSetAuth = () => {
|
|
|
|
|
|
clearSession();
|
2023-12-28 17:21:33 +08:00
|
|
|
|
router.push({ path: URL_LOGIN, query: route.query });
|
2021-06-07 17:22:07 +08:00
|
|
|
|
};
|
2023-12-28 17:21:33 +08:00
|
|
|
|
|
2021-06-07 17:22:07 +08:00
|
|
|
|
return {
|
|
|
|
|
|
onSetAuth,
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
.error {
|
|
|
|
|
|
height: 100%;
|
2023-10-14 00:38:51 +08:00
|
|
|
|
background-color: var(--bg-main-color);
|
2021-06-07 17:22:07 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
.error-flex {
|
|
|
|
|
|
margin: auto;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
height: 350px;
|
|
|
|
|
|
width: 900px;
|
|
|
|
|
|
.left {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
.left-item {
|
|
|
|
|
|
.left-item-animation {
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
animation-name: error-num;
|
|
|
|
|
|
animation-duration: 0.5s;
|
|
|
|
|
|
animation-fill-mode: forwards;
|
|
|
|
|
|
}
|
|
|
|
|
|
.left-item-num {
|
|
|
|
|
|
color: #d6e0f6;
|
|
|
|
|
|
font-size: 55px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.left-item-title {
|
|
|
|
|
|
font-size: 20px;
|
2023-10-14 16:00:16 +08:00
|
|
|
|
// color: #333333;
|
2021-06-07 17:22:07 +08:00
|
|
|
|
margin: 15px 0 5px 0;
|
|
|
|
|
|
animation-delay: 0.1s;
|
|
|
|
|
|
}
|
|
|
|
|
|
.left-item-msg {
|
|
|
|
|
|
color: #c0bebe;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
|
animation-delay: 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
.left-item-btn {
|
|
|
|
|
|
animation-delay: 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.right {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
animation-name: error-img;
|
|
|
|
|
|
animation-duration: 2s;
|
|
|
|
|
|
animation-fill-mode: forwards;
|
|
|
|
|
|
img {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|