import request from '@/router/axios';

export const getParamList = (goodsId) => {
  return request({
    url: '/api/mall/goodsparams/getByGoodsId',
    method: 'get',
    params: {
      goodsId: goodsId
    }
  })
}

export const getDetailParam = (id) => {
  return request({
    url: '/api/mall/goodsparams/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const removeParam = (ids) => {
  return request({
    url: '/api/mall/goodsparams/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const addParam = (row) => {
  return request({
    url: '/api/mall/goodsparams/submit',
    method: 'post',
    data: row
  })
}

export const updateParam = (row) => {
  return request({
    url: '/api/mall/goodsparams/submit',
    method: 'post',
    data: row
  })
}

