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/mall/product/property.ts | 89 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 89 insertions(+), 0 deletions(-)
diff --git a/src/api/mall/product/property.ts b/src/api/mall/product/property.ts
new file mode 100644
index 0000000..a191d82
--- /dev/null
+++ b/src/api/mall/product/property.ts
@@ -0,0 +1,89 @@
+import request from '@/config/axios'
+
+/**
+ * 鍟嗗搧灞炴��
+ */
+export interface PropertyVO {
+ id?: number
+ /** 鍚嶇О */
+ name: string
+ /** 澶囨敞 */
+ remark?: string
+}
+
+/**
+ * 灞炴�у��
+ */
+export interface PropertyValueVO {
+ id?: number
+ /** 灞炴�ч」鐨勭紪鍙� */
+ propertyId?: number
+ /** 鍚嶇О */
+ name: string
+ /** 澶囨敞 */
+ remark?: string
+}
+
+// ------------------------ 灞炴�ч」 -------------------
+
+// 鍒涘缓灞炴�ч」
+export const createProperty = (data: PropertyVO) => {
+ return request.post({ url: '/product/property/create', data })
+}
+
+// 鏇存柊灞炴�ч」
+export const updateProperty = (data: PropertyVO) => {
+ return request.put({ url: '/product/property/update', data })
+}
+
+// 鍒犻櫎灞炴�ч」
+export const deleteProperty = (id: number) => {
+ return request.delete({ url: `/product/property/delete?id=${id}` })
+}
+
+// 鑾峰緱灞炴�ч」
+export const getProperty = (id: number): Promise<PropertyVO> => {
+ return request.get({ url: `/product/property/get?id=${id}` })
+}
+
+// 鑾峰緱灞炴�ч」鍒嗛〉
+export const getPropertyPage = (params: PageParam) => {
+ return request.get({ url: '/product/property/page', params })
+}
+
+// 鑾峰緱灞炴�ч」绮剧畝鍒楄〃
+export const getPropertySimpleList = (): Promise<PropertyVO[]> => {
+ return request.get({ url: '/product/property/simple-list' })
+}
+
+// ------------------------ 灞炴�у�� -------------------
+
+// 鑾峰緱灞炴�у�煎垎椤�
+export const getPropertyValuePage = (params: PageParam & any) => {
+ return request.get({ url: '/product/property/value/page', params })
+}
+
+// 鑾峰緱灞炴�у��
+export const getPropertyValue = (id: number): Promise<PropertyValueVO> => {
+ return request.get({ url: `/product/property/value/get?id=${id}` })
+}
+
+// 鍒涘缓灞炴�у��
+export const createPropertyValue = (data: PropertyValueVO) => {
+ return request.post({ url: '/product/property/value/create', data })
+}
+
+// 鏇存柊灞炴�у��
+export const updatePropertyValue = (data: PropertyValueVO) => {
+ return request.put({ url: '/product/property/value/update', data })
+}
+
+// 鍒犻櫎灞炴�у��
+export const deletePropertyValue = (id: number) => {
+ return request.delete({ url: `/product/property/value/delete?id=${id}` })
+}
+
+// 鑾峰緱灞炴�у�肩簿绠�鍒楄〃
+export const getPropertyValueSimpleList = (propertyId: number): Promise<PropertyValueVO[]> => {
+ return request.get({ url: '/product/property/value/simple-list', params: { propertyId } })
+}
--
Gitblit v1.8.0