Compare commits

..

No commits in common. "b8d08b40bbadb119d18766a7f9fc27dd452e4d33" and "5044db830b35aeb7424c0f3081dcf78e6c314d8e" have entirely different histories.

View File

@ -55,16 +55,13 @@
<script setup lang="ts">
import { useQuasar } from 'quasar';
import { ApiError } from 'src/boot/axios';
import { getUserInfo, login } from 'src/api/UserApi';
import { login } from 'src/api/UserApi';
import { clearJwtToken, saveJwtToken } from 'src/configs/TokenManage';
import { reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { useUserStore } from 'src/stores/user-store';
import { handleRefreshToken } from 'src/utils/refreshToken';
const $q = useQuasar();
const router = useRouter();
const userStore = useUserStore();
const loginInfo = reactive({
account: '',
@ -77,14 +74,6 @@ async function doLogin() {
clearJwtToken();
const token = await login(loginInfo);
saveJwtToken(token);
const userInfo = await getUserInfo();
userStore.roles = userInfo.roles;
userStore.defaultRole = userInfo.defaultRole;
userStore.remainingSecond = userInfo.remainingSecond;
setTimeout(
() => handleRefreshToken(),
userInfo.remainingSecond * 1000 - 10000
);
router.push({ name: 'home' });
} catch (err) {
visible.value = false;