import { axios } from '@/utils/request'
import Qs from 'qs'

/**
 * 编辑基本信息
 *
 * @author yubaoshan
 * @date 2020/6/8 11:11
 */
export function addBasicInfo (data) {
    return axios({
        url: '/zjxl/basicInfo/addBasicInfo',
        method: 'post',
        data: Qs.stringify(data)
    })
}

export function findBasicInfo (parameter) {
  return axios({
      url: '/zjxl/basicInfo/findBasicInfo',
      method: 'get',
      params: parameter
  })
}

/**
 * 查询文章管理列表
 *
 * @author yubaoshan
 * @date 2020/6/8 11:11
 */
export function findArticleContentById (parameter) {
    return axios({
        url: '/zjxl/zjxlArticleContent/findArticleContentById',
        method: 'get',
        params: parameter
    })
}

/**
 * 添加文章
 *
 * @author yubaoshan
 * @date 2020/6/8 11:11
 */
export function addArticleContent (data) {
    return axios({
        url: '/zjxl/zjxlArticleContent/addArticleContent',
        method: 'post',
        data: Qs.stringify(data)
    })
}
/**
 * 修改文章
 *
 * @author yubaoshan
 * @date 2020/6/8 11:11
 */
export function updateArticleAllInfo (data) {
  return axios({
      url: '/zjxl/zjxlArticleContent/updateArticleAllInfo',
      method: 'post',
      data: Qs.stringify(data)
  })
}

/**
 * 修改是否上线
 *
 * @author yubaoshan
 * @date 2020/6/8 11:11
 */
export function updateArticleContent (data) {
    return axios({
        url: '/zjxl/zjxlArticleContent/updateArticleContent',
        method: 'post',
        data: Qs.stringify(data)
    })
}

/**
 * 删除文章管理
 *
 * @author yubaoshan
 * @date 2020/6/8 11:11
 */
export function deleteArticleContent (data) {
    return axios({
        url: '/zjxl/zjxlArticleContent/deleteArticleContent',
        method: 'post',
        data: Qs.stringify(data)
    })
}

/**
 * 查询文章分类
 *
 * @author yubaoshan
 * @date 2020/6/8 11:11
 */
export function getSystemDictClassify (parameter) {
  return axios({
      url: '/zjxl/zjxlArticleContent/getLeftTabs',
      method: 'get',
      params: parameter
  })
}

/**
 * 查询文章子分类
 *
 * @author yubaoshan
 * @date 2020/6/8 11:11
 */
export function getSystemDictSubClassify (parameter) {
  return axios({
      url: '/zjxl/zjxlArticleContent/getArticleContentSubclassify',
      method: 'get',
      params: parameter
  })
}
