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

const api = {
  baseUrl: '/notice'
};

export function getPage(param) {
  return axios({
    url: api.baseUrl + '/page',
    method: 'post',
    data: param,
    useFullLoading: false
  })
}

export function getDetail(id) {
  return axios({
    url: api.baseUrl + '/detail/' + id,
    method: 'get',
    useFullLoading: true
  })
}

export function save(param) {
  return axios({
    url: api.baseUrl + '/detail',
    method: 'post',
    data: param,
    useFullLoading: true
  })
}

export function deleteOne(id) {
  return axios({
    url: api.baseUrl + '/' + id,
    method: 'delete',
    useFullLoading: true
  })
}

export function changeStatus(id) {
  return axios({
    url: api.baseUrl + '/change/status/' + id,
    method: 'put',
    useFullLoading: true
  })
}