report.ts 593 Bytes
import { AnyObject, QueryForParams } from '@/types/global';

import { Tag } from '@/types/tag';
import axios from 'axios';

export default class useReportApi {
  static typeOption = [{ value: 3, label: '聊天' }];

  static statusOption = [
    { value: 0, label: '未处理' },
    { value: 1, label: '已处理' },
  ];

  static async get(params?: QueryForParams) {
    return axios.get('system/reports', { params });
  }

  static async update(id: number, data: AnyObject): Promise<Tag> {
    return axios.put(`system/reports/${id}`, data).then((res) => Promise.resolve(res.data));
  }
}