|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
import { create } from 'zustand'
|
|
|
|
|
import { devtools } from 'zustand/middleware'
|
|
|
|
|
import { fetchJSON, postForm } from '@/utils/request'
|
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage'
|
|
|
|
|
import { fetchJSON } from '@/utils/request'
|
|
|
|
|
|
|
|
|
|
export const fetchHotelList = async (hotelName, checkinDateString, checkoutDateString) => {
|
|
|
|
|
const { errcode, data } = await fetchJSON(
|
|
|
|
@ -20,7 +19,7 @@ export const fetchAvailability = async (hotelId, checkinDateString, checkoutDate
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const useHotelStore = create(devtools((set, get) => ({
|
|
|
|
|
const useHotelStore = create(devtools((set) => ({
|
|
|
|
|
|
|
|
|
|
selectedHotel: null,
|
|
|
|
|
hotelList: [],
|
|
|
|
|