From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/api/iot/product/category/index.ts | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/src/api/iot/product/category/index.ts b/src/api/iot/product/category/index.ts
new file mode 100644
index 0000000..cad17f5
--- /dev/null
+++ b/src/api/iot/product/category/index.ts
@@ -0,0 +1,43 @@
+import request from '@/config/axios'
+
+// IoT 浜у搧鍒嗙被 VO
+export interface ProductCategoryVO {
+ id: number // 鍒嗙被 ID
+ name: string // 鍒嗙被鍚嶅瓧
+ sort: number // 鍒嗙被鎺掑簭
+ status: number // 鍒嗙被鐘舵��
+ description: string // 鍒嗙被鎻忚堪
+}
+
+// IoT 浜у搧鍒嗙被 API
+export const ProductCategoryApi = {
+ // 鏌ヨ浜у搧鍒嗙被鍒嗛〉
+ getProductCategoryPage: async (params: any) => {
+ return await request.get({ url: `/iot/product-category/page`, params })
+ },
+
+ // 鏌ヨ浜у搧鍒嗙被璇︽儏
+ getProductCategory: async (id: number) => {
+ return await request.get({ url: `/iot/product-category/get?id=` + id })
+ },
+
+ // 鏂板浜у搧鍒嗙被
+ createProductCategory: async (data: ProductCategoryVO) => {
+ return await request.post({ url: `/iot/product-category/create`, data })
+ },
+
+ // 淇敼浜у搧鍒嗙被
+ updateProductCategory: async (data: ProductCategoryVO) => {
+ return await request.put({ url: `/iot/product-category/update`, data })
+ },
+
+ // 鍒犻櫎浜у搧鍒嗙被
+ deleteProductCategory: async (id: number) => {
+ return await request.delete({ url: `/iot/product-category/delete?id=` + id })
+ },
+
+ /** 鑾峰彇浜у搧鍒嗙被绮剧畝鍒楄〃 */
+ getSimpleProductCategoryList: () => {
+ return request.get({ url: '/iot/product-category/simple-list' })
+ }
+}
--
Gitblit v1.8.0