import request from '@/utils/request'

// 分页查询资讯
export const pageList = (query) => {
  return request({
    url: '/system/sysInformation/pageList',
    method: 'get',
    params: query
  })
}

// 新增修改资讯
export const saveAndEdit = (data) => {
  return request({
    url: '/system/sysInformation/insertOrUpdate',
    method: 'post',
    data: data
  })
}

// 资讯发布与下线
export const ionline = (data) => {
  return request({
    url: '/system/sysInformation/online',
    method: 'post',
    data: data
  })
}

// 资讯置顶
export const gotoTop = (data) => {
  return request({
    url: '/system/sysInformation/gotoTop',
    method: 'post',
    data: data
  })
}


// 删除模板
export const deleteById = (id) => {
  return request({
    url: '/system/sysInformation/deleteById',
    method: 'delete',
    params: {id:id}
  })
}
