import request from '@/utils/request'

export function goodsExchangeRulesDetail(query) {
  return request({
    url: '/news/mall/getNotice',
    method: 'get',
    params: query
  })
}

export function updateGoodsExchangeRules(query) {
  return request({
    url: '/news/update',
    method: 'post',
    data: query
  })
}

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

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

export function goodsList(query) {
  return request({
    url: '/mall-sku/integral/page',
    method: 'post',
    params:query
  })
}

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

export function exchangeHistory(query) {
  return request({
    url: '/mall-sku/skuLog',
    method: 'post',
    params:query
  })
}