import request from '@/router/axios'

export function getClassifyDropDown() {
  return request({
    url: '/admin/mallGoodsSpec/dropDownBox',
    method: 'get'
  })
}

export function searchSpecByName(query) {
  return request({
    url: '/admin/mallGoodsSpec/getSpecByName',
    method: 'get',
    params: query
  })
}

export function searchSpecByClassId(query) {
  return request({
    url: '/admin/mallGoodsSpec/getSpecByClassId',
    method: 'get',
    params: query
  })
}


export function getSpecValue(query) {
  return request({
    url: '/admin/mallGoodsSpec/getSpecValueById',
    method: 'get',
    params: query
  })
}

export function getGoodsDetails(query) {
  return request({
    url: '/admin/mallGoods/getDetailsById',
    method: 'get',
    params: query
  })
}


// addOrEditGoods(this.form)
//   .then((res)=>{
//     this.$message.success('添加成功')
//     this.$emit('success')
//   }).catch(e => {
//   this.$message.success('添加失败')
// });
// }).catch(() => {
//   this.tableLoading = false
// })
// export function addOrEditGoods(data) {
//   return request({
//     url: '/admin/merchantMallGoods/addOrEditGoods',
//     method: 'post',
//     params: data
//
//   })
// }



/*** 自定义添加 ***/
export function getMerchantByAccount(parameter) {
  return request({
    url: '/admin/merchantMallGoods/getMerchantByAccount',
    method: 'get',
    params:parameter
  })
}
