import { axios } from '@/util/axios/request'

const api = {
  homeMyMsg: '/home/my/msg',
  systemMsg: '/home/sys/msg',
}

export function getHomeMyMsg() {
  return axios({
    url: api.homeMyMsg,
    method: 'get',
    useFullLoading: true
  })
}


export function getSysMsg(id) {
  return axios({
    url: `/home/sys/msg/${id}`,
    method: 'get',
    useFullLoading: true
  })
}

export function getPersonList() {
  return axios({
    url: `/home/person/list`,
    method: 'get',
    useFullLoading: true
  })
}


export function getCarApplyList(parameter) {
  return axios({
    url: "/car/apply/list",
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}



export function getMyApplyList(parameter) {
  return axios({
    url: "/home/my/apply/list",
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}


export function getMyAuditList(parameter) {
  return axios({
    url: "/home/my/audit/list",
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}


export function saveCarApply(parameter) {
  return axios({
    url: "/car/apply/save",
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}


export function getSystemMsg(parameter) {
  return axios({
    url: api.systemMsg,
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}


export function getCarApplyDetail(id) {
  return axios({
    url: `/car/apply/detail/${id}`,
    method: 'get',
    useFullLoading: false
  })
}

export function getCarSelectList() {
  return axios({
    url: `/car/info/select/list`,
    method: 'get',
    useFullLoading: false
  })
}


export function readMsg(id) {
  return axios({
    url: `/home/sys/msg/${id}`,
    method: 'get',
    useFullLoading: false
  })
}



export function carAudit(parameter) {
  return axios({
    url: '/car/apply/audit',
    method: 'post',
    data: parameter,
    useFullLoading: false
  })
}



