import FetchRequest from "@/api/FetchRequest"; class GroupInviteApi { //基础url static url = "/api/sys/groupInvites"; /** * 查询当前待审核的群邀请 */ static list(groupId: string): Promise { return FetchRequest.get(`${this.url}?groupId=${groupId}`, true); } /** * 查询当前待审核的群邀请数量 */ static waitCheckList(): Promise { return FetchRequest.get(`${this.url}/waitCheckList`, true); } /** * 同意加群 * @param id 邀请id */ static agree(id: string): Promise { return FetchRequest.post(`${this.url}/agree/${id}`, "", true); } /** * 拒绝加群 * @param id 邀请id */ static refuse(id: string): Promise { return FetchRequest.post(`${this.url}/refuse/${id}`, "", true); } } export default GroupInviteApi;