import request from '@/utils/request'

export function index(params){
  return request({
    method:'get',
    url:'/api/admin/product/index',
    params
  })
}

export function show(params){
  return request({
    method:'get',
    url:'/api/admin/product/show',
    params
  })
}

export function store(data){
  return request({
    method:'post',
    url:'/api/admin/product/store',
    data
  })
}

export function save(data){
  return request({
    method:'post',
    url:'/api/admin/product/save',
    data
  })
}

export function destroy(data){
  return request({
    method:'post',
    url:'/api/admin/product/destroy',
    data
  })
}

export function toggleActive(data){
  return request({
    method:'post',
    url:'/api/admin/product/toggleActive',
    data
  })
}
