|
@@ -1,36 +1,35 @@
|
|
|
import request from '@/utils/request'
|
|
|
|
|
|
-// 查询分类列表
|
|
|
-export function list(query) {
|
|
|
+// 列表
|
|
|
+export function list(data) {
|
|
|
return request({
|
|
|
- url: `/device/manage/category/list`,
|
|
|
- method: 'get',
|
|
|
- params: query
|
|
|
+ url: `/admin/device/same/list/page`,
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-// 添加设备类型
|
|
|
-export function create(data) {
|
|
|
+// 上架 下架 删除
|
|
|
+export function change(id, status) {
|
|
|
return request({
|
|
|
- url: `/device/manage/category/add`,
|
|
|
- method: 'post',
|
|
|
- data: data
|
|
|
+ url: `/admin/device/same/hitOrSold/${id}/${status}`,
|
|
|
+ method: 'get'
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-// 编辑设备类型
|
|
|
-export function edit(data) {
|
|
|
+// 新增
|
|
|
+export function submit(data) {
|
|
|
return request({
|
|
|
- url: `/device/manage/category/edit`,
|
|
|
+ url: `/admin/device/same/saveOrUpdate`,
|
|
|
method: 'post',
|
|
|
- data: data
|
|
|
+ data
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-// 删除
|
|
|
-export function remove(id) {
|
|
|
+// 全部产品 和 剔除产品
|
|
|
+export function devList(type) {
|
|
|
return request({
|
|
|
- url: `/device/manage/category/${id}`,
|
|
|
- method: 'delete'
|
|
|
+ url: `/admin/device/same/getIsExistclientTypeList/${type}`,
|
|
|
+ method: 'get'
|
|
|
})
|
|
|
}
|