fix: bug初始化页面跳转

This commit is contained in:
leiqiaochu 2023-03-30 14:18:12 +08:00
parent fc3d0d2d12
commit 7ab063a790
1 changed files with 13 additions and 1 deletions

View File

@ -66,7 +66,7 @@ import Role from './Role/index.vue';
import Menu from './Menu/index.vue';
import InitData from './InitData/index.vue';
import { modalState, formState, logoState } from './data/interface';
import { saveInit } from '@/api/initHome';
import { getInit, saveInit } from '@/api/initHome';
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
import { FILE_UPLOAD } from '@/api/comm';
import { LocalStore } from '@/utils/comm';
@ -128,6 +128,18 @@ const submitData = async () => {
}
}
};
/**
* 判断是否已有配置
*/
const judgeInitSet = async () => {
const resp:any = await getInit();
if(resp.status === 200 && resp.result.length){
window.location.href = '/';
}
}
onMounted(()=>{
judgeInitSet();
});
</script>
<style scoped lang="less">
.page-container {