gemercheung 2 年之前
父節點
當前提交
9a5f00f962
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 1 0
      src/api/statistic.ts
  2. 3 2
      src/store/modules/room.ts

+ 1 - 0
src/api/statistic.ts

@@ -124,3 +124,4 @@ export const getOnlineTimeCount = async (): Promise<DataLabelType[]> => {
 export const getRoomVisitData = async (param: RoomMsgParams): Promise<RoomUseType> => {
     return await axios.get<RoomUseType>('takelook/roomVisitData', { params: param })
 }
+

+ 3 - 2
src/store/modules/room.ts

@@ -109,13 +109,14 @@ export const useRoomStore = defineStore('room', {
     },
     async update(room: Room) {
       await updateRoom(room, this.getNums(room))
-      await this.fetchList()
+      await this.fetchList(this.roomStatus);
     },
     async insert(room: Omit<Room, 'id'>) {
       await insertRoom(room, this.getNums(room))
       // const sroom =
       // this.list.push({ ...room, ...sroom })
-      this.fetchList()
+      console.log(this.roomStatus)
+      this.fetchList(this.roomStatus);
     },
     async setRoomScenes(room: Room) {
       const roomInfo = await fetchRoomDetail(room.id)