GroupInviteApi.ts 837 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import FetchRequest from "@/api/FetchRequest";
  2. class GroupInviteApi {
  3. //基础url
  4. static url = "/api/sys/groupInvites";
  5. /**
  6. * 查询当前待审核的群邀请
  7. */
  8. static list(groupId: string): Promise<any> {
  9. return FetchRequest.get(`${this.url}?groupId=${groupId}`, true);
  10. }
  11. /**
  12. * 查询当前待审核的群邀请数量
  13. */
  14. static waitCheckList(): Promise<any> {
  15. return FetchRequest.get(`${this.url}/waitCheckList`, true);
  16. }
  17. /**
  18. * 同意加群
  19. * @param id 邀请id
  20. */
  21. static agree(id: string): Promise<any> {
  22. return FetchRequest.post(`${this.url}/agree/${id}`, "", true);
  23. }
  24. /**
  25. * 拒绝加群
  26. * @param id 邀请id
  27. */
  28. static refuse(id: string): Promise<any> {
  29. return FetchRequest.post(`${this.url}/refuse/${id}`, "", true);
  30. }
  31. }
  32. export default GroupInviteApi;