fix: 去除开站引导
This commit is contained in:
@@ -173,14 +173,14 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
await appStore.fnSysConf();
|
await appStore.fnSysConf();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 需要系统引导跳转
|
// // 需要系统引导跳转
|
||||||
if (appStore.bootloader && to.path !== '/quick-start') {
|
// if (appStore.bootloader && to.path !== '/quick-start') {
|
||||||
next({ name: 'QuickStart' });
|
// next({ name: 'QuickStart' });
|
||||||
}
|
// }
|
||||||
// 不重复引导
|
// // 不重复引导
|
||||||
if (!appStore.bootloader && to.path === '/quick-start') {
|
// if (!appStore.bootloader && to.path === '/quick-start') {
|
||||||
next({ name: 'Index' });
|
// next({ name: 'Index' });
|
||||||
}
|
// }
|
||||||
|
|
||||||
let token = getToken();
|
let token = getToken();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { getSysConf } from '@/api';
|
import { getSysConf } from '@/api';
|
||||||
import { CACHE_LOCAL_I18N, CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants';
|
import { CACHE_LOCAL_I18N, CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { removeToken } from '@/plugins/auth-token';
|
// import { removeToken } from '@/plugins/auth-token';
|
||||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||||
import { localGet, localSet } from '@/utils/cache-local-utils';
|
import { localGet, localSet } from '@/utils/cache-local-utils';
|
||||||
import { sessionSet } from '@/utils/cache-session-utils';
|
import { sessionSet } from '@/utils/cache-session-utils';
|
||||||
@@ -18,9 +18,9 @@ type AppStore = {
|
|||||||
|
|
||||||
/**服务版本 */
|
/**服务版本 */
|
||||||
version: string;
|
version: string;
|
||||||
buildTime: string;
|
// buildTime: string;
|
||||||
/**系统引导使用 */
|
/**系统引导使用 */
|
||||||
bootloader: boolean;
|
// bootloader: boolean;
|
||||||
// 用户登录认证
|
// 用户登录认证
|
||||||
loginAuth: boolean;
|
loginAuth: boolean;
|
||||||
// 用户接口加密
|
// 用户接口加密
|
||||||
@@ -55,8 +55,8 @@ const useAppStore = defineStore('app', {
|
|||||||
appVersion: import.meta.env.VITE_APP_VERSION,
|
appVersion: import.meta.env.VITE_APP_VERSION,
|
||||||
|
|
||||||
version: `-`,
|
version: `-`,
|
||||||
buildTime: `-`,
|
// buildTime: `-`,
|
||||||
bootloader: false,
|
// bootloader: false,
|
||||||
loginAuth: true,
|
loginAuth: true,
|
||||||
cryptoApi: true,
|
cryptoApi: true,
|
||||||
serialNum: `-`,
|
serialNum: `-`,
|
||||||
@@ -86,12 +86,12 @@ const useAppStore = defineStore('app', {
|
|||||||
const res = await getSysConf();
|
const res = await getSysConf();
|
||||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||||
this.version = res.data.version;
|
this.version = res.data.version;
|
||||||
this.buildTime = res.data.buildTime;
|
// this.buildTime = res.data.buildTime;
|
||||||
this.bootloader = res.data.bootloader === 'true';
|
// this.bootloader = res.data.bootloader === 'true';
|
||||||
// 引导时
|
// // 引导时
|
||||||
if (this.bootloader) {
|
// if (this.bootloader) {
|
||||||
removeToken();
|
// removeToken();
|
||||||
}
|
// }
|
||||||
this.loginAuth = res.data.loginAuth !== 'false';
|
this.loginAuth = res.data.loginAuth !== 'false';
|
||||||
this.cryptoApi = res.data.cryptoApi !== 'false';
|
this.cryptoApi = res.data.cryptoApi !== 'false';
|
||||||
sessionSet(CACHE_SESSION_CRYPTO_API, res.data.cryptoApi);
|
sessionSet(CACHE_SESSION_CRYPTO_API, res.data.cryptoApi);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ function fnGuideDone() {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
removeToken();
|
removeToken();
|
||||||
useAppStore().bootloader = false;
|
// useAppStore().bootloader = false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user