update user detail

This commit is contained in:
Timi
2026-08-07 16:02:29 +08:00
parent 1b1121f052
commit 28b789eb86
13 changed files with 421 additions and 147 deletions
+2 -3
View File
@@ -2,7 +2,6 @@ import type { StoreBusinessDayOpenStatus, StoreStatus } from "@/types/Store";
import { permissionCodes } from "@/utils/permission";
import { type Page, useUserStore } from "timi-web";
export const defaultStoreId = "00000000-0000-0000-0000-000000000001";
export const currentStoreIdStorageKey = "gao-customer-h5:current-store-id";
type LoginUserWithStore = {
@@ -21,9 +20,9 @@ type LoginUserWithStore = {
export function getCurrentStoreId(): string {
const userStore = useUserStore();
if (userStore.hasPermissions(permissionCodes.store.read)) {
return readStoredCurrentStoreId() || getLoginUserStoreId() || defaultStoreId;
return readStoredCurrentStoreId() || getLoginUserStoreId();
}
return getLoginUserStoreId() || defaultStoreId;
return getLoginUserStoreId();
}
export function setCurrentStoreId(storeId: string): void {