feat: 系统引导使用接口变更

This commit is contained in:
TsMask
2024-05-07 16:27:45 +08:00
parent 60a26dd015
commit b76fed7dcf
5 changed files with 30 additions and 20 deletions

View File

@@ -1,11 +1,10 @@
<script setup lang="ts">
import { onMounted, reactive } from 'vue';
import { fnToStepName } from '../hooks/useStep';
import { guideStart } from '@/api';
import { bootloaderStart } from '@/api';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { TOKEN_RESPONSE_FIELD } from '@/constants/token-constants';
import { getToken, setToken } from '@/plugins/auth-token';
import { Modal, message } from 'ant-design-vue/lib';
import { getToken, setToken } from '@/plugins/auth-token';
import { useRouter } from 'vue-router';
import useI18n from '@/hooks/useI18n';
const { t, changeLocale, optionsLocale } = useI18n();
@@ -18,7 +17,7 @@ const state = reactive({
/**引导开始 */
function fnGuideStart() {
if (getToken()) return;
guideStart().then(res => {
bootloaderStart().then(res => {
if (res.code === RESULT_CODE_SUCCESS && res.data) {
const token = res.data[TOKEN_RESPONSE_FIELD];
setToken(token);