🧪 test: test
This commit is contained in:
parent
26f1120982
commit
505aeb76df
@ -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<boolean> {
|
||||
initializing.value = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user