feat: 初始访问时跳转开站引导页面

This commit is contained in:
TsMask
2024-04-24 15:27:23 +08:00
parent e351960229
commit 1085fa16aa
3 changed files with 14 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
import { getSysConf } from '@/api';
import { CACHE_LOCAL_I18N } from '@/constants/cache-keys-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { removeToken } from '@/plugins/auth-token';
import { parseUrlPath } from '@/plugins/file-static-url';
import { localGet, localSet } from '@/utils/cache-local-utils';
import { defineStore } from 'pinia';
@@ -73,10 +74,6 @@ const useAppStore = defineStore('app', {
document.title = this.appName;
}
},
/**设置版权声明 */
setCopyright(text: string) {
this.copyright = text;
},
// 获取系统配置信息
async fnSysConf() {
const res = await getSysConf();
@@ -84,6 +81,10 @@ const useAppStore = defineStore('app', {
this.version = res.data.version;
this.buildTime = res.data.buildTime;
this.sysGuide = res.data.sysGuide === 'true';
// 引导时
if (this.sysGuide) {
removeToken();
}
this.serialNum = res.data.serialNum;
this.appName = res.data.title;
this.copyright = res.data.copyright;