import request from '@/utils/request'

export function create(data) {
  return request({
    url: '/mall-post/add',
    method: 'post',
    data
  })
}

export function update(query) {
  return request({
    url: '/mall-post/edit',
    method: 'post',
    data:query
  })
}

export function getList(query) {
  return request({
    url: '/mall-post/list',
    method: 'get',
    params:query
  })
}

export function changeState(query) {
  return request({
    url: '/mall-post/modify/status',
    method: 'post',
    params:query
  })
}

export function approvalList(query) {
  return request({
    url: 'mall-post/comment/list',
    method: 'get',
    params:query
  })
}

export function getDetailInfo(query) {
  return request({
    url: '/mall-post/answer/info',
    method: 'get',
    params:query
  })
}

export function complete(data) {
  return request({
    url: '/mall-post/complete/answer',
    method: 'post',
    data
  })
}



