|
|
@ -1,4 +1,5 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { login } from 'apis/login' |
|
|
|
import { setToken } from 'libs/token' |
|
|
|
import { useSystemStore } from 'stores/systemStore' |
|
|
|
import { onBeforeUnmount, onMounted, ref } from 'vue' |
|
|
@ -21,6 +22,11 @@ const startProgress = () => { |
|
|
|
setToken('111') |
|
|
|
useSystemStore().updateSystemUser({ username: '管理员' }) |
|
|
|
router.push('/') |
|
|
|
login({ username: 'admin', password: '12345' }).then((res) => { |
|
|
|
setToken('111') |
|
|
|
useSystemStore().updateSystemUser({ username: res.username }) |
|
|
|
router.push('/') |
|
|
|
}) |
|
|
|
} |
|
|
|
}, 100) |
|
|
|
} |
|
|
|