import request from '@/utils/request'

// 列表
export function list(){
  return request({
    url: `/admin/applets/list`,
    method: 'get'
  })
}

// 详情
export function detail(id) {
  return request({
    url: `/admin/applets/queryById/${id}`,
    method: 'get'
  })
}

// 关联设备
export function devices(type){
  return request({
    url: `/admin/applets/getIsExistclientTypeList/${type}`,
    method: 'post'
  })
}

// 新增 编辑
export function submit(data) {
  return request({
    url: `/admin/applets/addOrUpdate`,
    method: 'post',
    data
  })
}

// 删除
export function remove(ids) {
  return request({
    url: `/admin/applets/remove/${ids}`,
    method: 'delete'
  })
}