import { request } from '@/utils/request.js';

export const getMyMessages = (data) =>
  request({
    url: '/api/sys/message/pageByTypes',
    params: data,
  });
export const getMyMessagesCount = (types) =>
  request({
    url: '/api/sys/message/countByTypes',
    params: { types },
  });

export const getMyWaits = (data) =>
  request({
    url: '/api/admin/flow/task/list',
    params: data,
  });

export const setMyMessagesRead = (id) =>
  request({
    url: '/api/sys/message/read',
    params: { id },
  });

export const getViolationBy = (code) =>
  request({
    url: '/api/admin/tb/violation/getByCode?code=' + code,
    // method: 'get',
    loading: true,
  });
