import request from '@/utils/request'

// 查询线下店铺列表
export function listShop(query) {
  return request({
    url: '/store/getStoreList',
    method: 'get',
    params: query
  })
}

//添加店铺
export function addShop(data) {
  return request({
    url: '/store/addStore',
    method: 'post',
    data: data
  })
}

//修改店铺
export function updateShop(data) {
  return request({
    url: '/store/updateStore',
    method: 'put',
    data: data
  })
}

//删除店铺
export function delShop(data) {
  return request({
    url:'/store/deleteStore',
    method:'delete',
    params:data
  })
}

//查看店铺已有设备
export function shopEquip(data) {
  return request({
    url:'/equimpent/getEquipmentByStoreId',
    method:'get',
    params:data
  })
}

//查看店铺未分配设备
export function shopNoEquip(data) {
  return request({
    url:'/equimpent/getEquipmentBySelect',
    method:'get',
    params:data
  })
}

//店铺添加设备
export function shopAddEquip(data) {
  return request({
    url:'/equimpent/addStoreEquipment',
    method:'put',
    data:data
  })
}

//店铺移除设备
export function shopRemoveEquip(data) {
  return request({
    url:'/equimpent/deleteStoreEquipment',
    method: 'delete',
    params: data
  })
}

//小程序列表
export function appList(data) {
  return request({
    url:'/app/getAppList',
    method: 'get',
    params: data
  })
}

//添加小城
export function addApp(data) {
  return request({
    url:'/app/addApp',
    method: 'post',
    data: data
  })
}

//修改小程城
export function updateApp(data) {
  return request({
    url:'/app/updateApp',
    method: 'put',
    data: data
  })
}

//删除小程序
export function deleApp(data) {
  return request({
    url:'/app/deleteApp',
    method: 'delete',
    params: data
  })
}

// 禁用小程序
export function disableApp(data) {
  return request({
    url:'/app/stopApp/' + data,
    method: 'put',
  })
}

//启用小程序
export function enableApp(data) {
  return request({
    url:'/app/recoverApp/' + data,
    method: 'put',
  })
}