import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取列表
export function getList(params) {
  return request({
    url: `/goods/lease/list/page`,
    method: 'post',
    params
  })
}

//导出
export function pageExport(data, name) {
  return postBlob({
    url: '/goods/lease/list/page/export',
    data,
    name
  })
}

// 保存
export function save(data) {
  return request({
    url: `/goods/lease/save`,
    method: 'post',
    data
  })
}

// 删除
export function del(data) {
  return request({
    url: `/goods/lease/del`,
    method: 'post',
    data
  })
}

// 详情
export function getDetail(params) {
  return request({
    url: `/goods/lease/detail`,
    method: 'post',
    params
  })
}

// 获取商品状态条数
export function getGoodsStateCount(params) {
  return request({
    url: '/goods/lease/count',
    method: 'post',
    params
  })
}

// 上下架
export function updateStatus(params) {
  return request({
    url: `/websit/goods/batch/update/status`,
    method: 'post',
    params
  })
}

// 获取商品分类
export function getClassifyList(params) {
  return request({
    url: '/goods/category/list',
    method: 'get',
    params
  })
}