diff --git a/src/stores/user.ts b/src/stores/user.ts index bcaa52e..10e04bc 100644 --- a/src/stores/user.ts +++ b/src/stores/user.ts @@ -40,19 +40,19 @@ export const useUserStore = defineStore('user', () => { !clubPermissionId || ensureArray(clubPermissionId).every((id) => clubPermissions.value.has(id)); const initializing = ref(false); const logined = computed(() => (userInfo.value && userInfo.value.id !== -1) ?? false); - watch( - userInfo, - (info, old) => { - router.push({ - path: - info && (info.id !== -1 || !old || old.id === -1) - ? router.currentRoute.value.fullPath - : '/', - force: true, - }); - }, - { flush: 'sync' }, - ); + // watch( + // userInfo, + // (info, old) => { + // router.push({ + // path: + // info && (info.id !== -1 || !old || old.id === -1) + // ? router.currentRoute.value.fullPath + // : '/', + // force: true, + // }); + // }, + // { flush: 'sync' }, + // ); const isSelf = (id: string | number) => userInfo.value?.id === Number(id); async function updateSelfUserInfo(): Promise { initializing.value = true;