import request from '@/utils/request'

// 分页查询产品朋友圈列表
export function pageListMoment(query) {
  return request({
    url: '/moment/moment/pageList',
    method: 'get',
    params: query
  })
}

// 查询产品朋友圈列表
export function listMoment(query) {
  return request({
    url: '/moment/moment/list',
    method: 'get',
    params: query
  })
}

// 查询产品朋友圈详细
export function getMoment(id) {
  return request({
    url: '/moment/moment/' + id,
    method: 'get'
  })
}

// 新增产品朋友圈
export function addMoment(data) {
  return request({
    url: '/moment/moment',
    method: 'post',
    data: data
  })
}

// 修改产品朋友圈
export function changeStatusByMoment(data) {
  return request({
    url: '/moment/moment/changeStatus',
    method: 'put',
    data: data
  })
}

// 修改产品朋友圈
export function updateMoment(data) {
  return request({
    url: '/moment/moment',
    method: 'put',
    data: data
  })
}

// 删除产品朋友圈
export function delMoment(id) {
  return request({
    url: '/moment/moment/' + id,
    method: 'delete'
  })
}

// 导出产品朋友圈
export function exportMoment(query) {
  return request({
    url: '/moment/moment/' + 'export',
    method: 'post',
    params: query
  })
}
