修了一些feature

This commit is contained in:
Maikiwi
2023-10-15 04:13:50 -07:00
parent d1bcce05dc
commit 6964ac9b97
3 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
export const useAppInfo = createSharedComposable(() => {
const { auth } = useAuth();
const { isLoggedin } = useAuth();
const running = ref<boolean>(false);
const version = ref<string>('');
@@ -11,7 +11,7 @@ export const useAppInfo = createSharedComposable(() => {
version.value = res.version;
});
if (auth.value !== '') {
if (isLoggedin.value !== false) {
execute();
}
}

View File

@@ -1,6 +1,6 @@
export const useLogStore = defineStore('log', () => {
const log = ref('');
const { auth } = useAuth();
const { isLoggedin } = useAuth();
const message = useMessage();
function get() {
@@ -10,7 +10,7 @@ export const useLogStore = defineStore('log', () => {
log.value = value;
});
if (auth.value !== '') {
if (isLoggedin.value !== false) {
execute();
}
}

View File

@@ -35,8 +35,8 @@ axios.interceptors.response.use(
/** token 过期 */
if (error.status === 401) {
const { auth } = useAuth();
auth.value = '';
const { isLoggedin } = useAuth();
isLoggedin.value = false;
}
/** 执行失败 */