|
@@ -1,6 +1,6 @@
|
|
|
|
|
|
|
|
|
|
-import { GET_HOME_ROOM_LIST } from '../utils/apiList'
|
|
|
|
|
|
+import { GET_HOME_ROOM_LIST, GET_MY_ROOM_LIST } from '../utils/apiList'
|
|
import { request, Response } from '../utils/http'
|
|
import { request, Response } from '../utils/http'
|
|
|
|
|
|
|
|
|
|
@@ -30,10 +30,19 @@ type RoomListRes = Response & {
|
|
data: ListItem[]
|
|
data: ListItem[]
|
|
}
|
|
}
|
|
export const getHomeRoomList = async (params: parmams): Promise<ListItem[]> => {
|
|
export const getHomeRoomList = async (params: parmams): Promise<ListItem[]> => {
|
|
- const res = await request.get<RoomListRes>(GET_HOME_ROOM_LIST, {
|
|
|
|
|
|
+ const res = await request.post<RoomListRes>(GET_HOME_ROOM_LIST, {
|
|
pageNum: params.pageNum || 1,
|
|
pageNum: params.pageNum || 1,
|
|
pageSize: params.pageSize || 1000
|
|
pageSize: params.pageSize || 1000
|
|
})
|
|
})
|
|
- return res.data
|
|
|
|
|
|
+
|
|
|
|
+ return res.data.list
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+export const getHMyRoomList = async (params: parmams): Promise<ListItem[]> => {
|
|
|
|
+ const res = await request.post<RoomListRes>(GET_MY_ROOM_LIST, {
|
|
|
|
+ pageNum: params.pageNum || 1,
|
|
|
|
+ pageSize: params.pageSize || 1000
|
|
|
|
+ })
|
|
|
|
+ return res.data.list
|
|
|
|
|
|
}
|
|
}
|