接入前端登录权限底座
This commit is contained in:
1 parent
c190d5e3a8
commit
e49b2ccc1d
27 files changed
+1745
-68
No files matched your search
@@ -1,3 +1,14 @@
|
||||
const configuredReservationHotelId = import.meta.env.VITE_RESERVATION_HOTEL_ID?.trim()
|
||||
|
||||
export const reservationHotelId = configuredReservationHotelId || 'HOTEL-TEST'
|
||||
|
||||
let reservationHotelIdProvider: (() => string | null | undefined) | null = null
|
||||
|
||||
export function setReservationHotelIdProvider(provider: (() => string | null | undefined) | null): void {
|
||||
reservationHotelIdProvider = provider
|
||||
}
|
||||
|
||||
export function getReservationHotelId(): string {
|
||||
const providedHotelId = reservationHotelIdProvider?.()?.trim()
|
||||
return providedHotelId || reservationHotelId
|
||||
}
|
||||
Reference in new issue
Block a user