import request from '@/utils/request'

// 轮播图
export function getBannerList(data: any) {
  return request.post('/sys/banner/data', data)
}
export function saveBanner(data: any) {
  return request.post('/sys/banner/save', data, {
    headers: { 'content-type': 'application/x-www-form-urlencoded' }
  })
}
export function deleteBanner(data: any) {
  return request.get('/sys/banner/delete', {
    params: data
  })
}

// 常见问题
export function getQuestionList(data: any) {
  return request.post('/sys/questionIntro/data', data)
}
export function saveQuestion(data: any) {
  return request.post('/sys/questionIntro/save', data, {
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
  })
}
export function deleteQuestion(data: any) {
  return request.get('/sys/questionIntro/delete', {
    params: data
  })
}

// 意见反馈
export function getAdviceList(data: any) {
  return request.get('/setting/advice/list', {
    params: data
  })
}
export function saveAdvice(data: any) {
  return request.get('/setting/advice/updateRegContent', {
    params: data
  })
}
export function deleteAdvice(data: any) {
  return request.get('/setting/advice/delete', {
    params: data
  })
}

// 关于我们
export function getAboutUs() {
  return request.get('/setting/about/info')
}
export function saveAboutUs(data: any) {
  return request.post('/setting/about/save', data, {
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
  })
}

// 版本信息
// 列表
export function getVersionList(data: any) {
  return request.get('/setting/version/list', {
    params: data
  })
}
// 保存
export function saveVersion(data: any) {
  return request.post('/setting/version/save', data, {
    headers: { 'content-type': 'application/x-www-form-urlencoded' }
  })
}
// 删除
export function deleteVersion(data: any) {
  return request.post('/setting/version/delete', data, {
    headers: { 'content-type': 'application/x-www-form-urlencoded' }
  })
}
