소스 검색

接口文件

DESKTOP-SVI9JE1\muzen 1 년 전
부모
커밋
ab22926433
2개의 변경된 파일53개의 추가작업 그리고 18개의 파일을 삭제
  1. 36 0
      src/api/device/category.js
  2. 17 18
      src/api/device/class.js

+ 36 - 0
src/api/device/category.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+// 查询分类列表
+export function list(query) {
+  return request({
+    url: `/device/manage/category/list`,
+    method: 'get',
+    params: query
+  })
+}
+
+// 添加设备类型
+export function create(data) {
+  return request({
+    url: `/device/manage/category/add`,
+    method: 'post',
+    data: data
+  })
+}
+
+// 编辑设备类型
+export function edit(data) {
+  return request({
+    url: `/device/manage/category/edit`,
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除
+export function remove(id) {
+  return request({
+    url: `/device/manage/category/${id}`,
+    method: 'delete'
+  })
+}

+ 17 - 18
src/api/device/class.js

@@ -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'
   })
 }