|
|
@@ -0,0 +1,85 @@
|
|
|
+<template>
|
|
|
+ <div class="auth-message-page" v-if="!isAuthValid">
|
|
|
+ <div class="back-mask"></div>
|
|
|
+ <div class="auth-kanban">
|
|
|
+ <div class="auth-content">
|
|
|
+ <el-icon class="auth-icon" size="24px"><WarningFilled /></el-icon>
|
|
|
+ <div class="auth-text">登录信息已过期,请重新登录?</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; justify-content: end">
|
|
|
+ <el-button @click="isAuthValid = true">取消</el-button>
|
|
|
+ <el-button type="primary" @click="handleClick">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+ import { WarningFilled } from '@element-plus/icons-vue';
|
|
|
+ import useAuthStore from '@/store/modules/useAuth';
|
|
|
+ import { storeToRefs } from 'pinia';
|
|
|
+ import { getRedirectUrl } from '@/utils/getRedirectUrl';
|
|
|
+
|
|
|
+ const authStore = useAuthStore();
|
|
|
+ const { isAuthValid } = storeToRefs(authStore);
|
|
|
+
|
|
|
+ const handleClick = () => {
|
|
|
+ // 跳转登录页面
|
|
|
+ window.location.href = getRedirectUrl();
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+ .auth-message-page {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ z-index: 2008;
|
|
|
+ }
|
|
|
+
|
|
|
+ .back-mask {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ background-color: rgba(0, 0, 0, 0.5);
|
|
|
+ }
|
|
|
+
|
|
|
+ .auth-kanban {
|
|
|
+ display: inline-block;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ max-width: 420px;
|
|
|
+ width: 100%;
|
|
|
+ padding: 12px;
|
|
|
+ vertical-align: middle;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 18px;
|
|
|
+ box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.04), 0px 8px 20px rgba(0, 0, 0, 0.08);
|
|
|
+ text-align: left;
|
|
|
+ overflow: hidden;
|
|
|
+ backface-visibility: hidden;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow-wrap: break-word;
|
|
|
+ }
|
|
|
+
|
|
|
+ .auth-content {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ color: #606266;
|
|
|
+ font-size: 14px;
|
|
|
+ margin: 12px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .auth-icon {
|
|
|
+ color: #e6a23c;
|
|
|
+ }
|
|
|
+
|
|
|
+ .auth-text {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+</style>
|