import HttpKit from '@/utils/http-kit'

export default {
  /**
   * 功能描述：查询[新闻资讯]
   */
  page(form) {
    return HttpKit.post(`/admin/info/news/page`, form).then(
      res => res.data
    )
  },
  /**
   * 功能描述：保存/更新[新闻资讯]
   * @param news
   */
  saveOrUpdate(form) {
    return HttpKit.post(`/admin/info/news/save-or-update`, form).then(
      res => res.data
    )
  },
  /**
   * 功能描述：替换[新闻资讯]删除状态
   * @param id
   */
  handleIsDel(id) {
    return HttpKit.post(`/admin/info/news/handle-is-del`, { id: id }).then(
      res => res.data
    )
  },
  findNewsById(id) {
    return HttpKit.post(`/admin/info/news/${id}`).then(
      res => res.data
    )
  }
}
