😎前端文件格式化

This commit is contained in:
zuohuaijun 2025-09-14 15:17:16 +08:00
parent 71236007ee
commit e6049c66fb
3 changed files with 1 additions and 12 deletions

View File

@ -46,7 +46,6 @@ declare interface RoutesListState<T = any> {
// 布局配置
declare interface ThemeConfigState {
themeConfig: {
serverTime?: Date; // 服务器时间
isDrawer: boolean; // 是否开启抽屉配置
primary: string; // 主题颜色
topBar: string; // 顶部栏背景

View File

@ -11,11 +11,6 @@ import { BaseAPI, BASE_PATH } from '../api-services/system/base';
import { ElMessage } from 'element-plus';
import { Local, Session } from '../utils/storage';
import { useThemeConfig } from '/@/stores/themeConfig';
import { storeToRefs } from 'pinia';
const storesThemeConfig = useThemeConfig();
const { themeConfig } = storeToRefs(storesThemeConfig);
// 接口服务器配置
export const serveConfig = new Configuration({
@ -71,7 +66,7 @@ axiosInstance.interceptors.request.use(
const exp = getJWTDate(jwt.exp as number);
// token 已经过期
if (themeConfig.value.serverTime && themeConfig.value.serverTime >= exp) {
if (new Date() >= exp) {
// 获取刷新 token
const refreshAccessToken = Local.get(refreshAccessTokenKey);
@ -108,9 +103,6 @@ axiosInstance.interceptors.request.use(
// axios 响应拦截
axiosInstance.interceptors.response.use(
(res) => {
// 记录服务器时间
themeConfig.value.serverTime = res.data.time ? new Date(res.data.time) : undefined;
// 获取状态码和返回数据
var status = res.status;
var serve = res.data;

View File

@ -65,8 +65,6 @@ export async function loadSysInfo(tenantid: number) {
themeConfig.value.onlineNotice = data.onlineNotice;
// 密码加解密公匙
window.__env__.VITE_SM_PUBLIC_KEY = data.publicKey;
// 服务器时间
themeConfig.value.serverTime = res.data.time ? new Date(Date.parse(res.data.time as any)) : undefined;
// 更新 favicon
updateFavicon(data.logo);