mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-10-31 18:28:44 +08:00 
			
		
		
		
	
							
								
								
									
										60
									
								
								src/api/mall/product/category.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								src/api/mall/product/category.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| import request from '@/config/axios' | ||||
|  | ||||
| /** | ||||
|  * 产品分类 | ||||
|  */ | ||||
| export interface CategoryVO { | ||||
|   /** | ||||
|    * 分类编号 | ||||
|    */ | ||||
|   id?: number | ||||
|   /** | ||||
|    * 父分类编号 | ||||
|    */ | ||||
|   parentId?: number | ||||
|   /** | ||||
|    * 分类名称 | ||||
|    */ | ||||
|   name: string | ||||
|   /** | ||||
|    * 分类图片 | ||||
|    */ | ||||
|   picUrl: string | ||||
|   /** | ||||
|    * 分类排序 | ||||
|    */ | ||||
|   sort?: number | ||||
|   /** | ||||
|    * 分类描述 | ||||
|    */ | ||||
|   description?: string | ||||
|   /** | ||||
|    * 开启状态 | ||||
|    */ | ||||
|   status: number | ||||
| } | ||||
|  | ||||
| // 创建商品分类 | ||||
| export const createCategory = (data: CategoryVO) => { | ||||
|   return request.post({ url: '/product/category/create', data }) | ||||
| } | ||||
|  | ||||
| // 更新商品分类 | ||||
| export const updateCategory = (data: CategoryVO) => { | ||||
|   return request.put({ url: '/product/category/update', data }) | ||||
| } | ||||
|  | ||||
| // 删除商品分类 | ||||
| export const deleteCategory = (id: number) => { | ||||
|   return request.delete({ url: `/product/category/delete?id=${id}` }) | ||||
| } | ||||
|  | ||||
| // 获得商品分类 | ||||
| export const getCategory = (id: number) => { | ||||
|   return request.get({ url: `/product/category/get?id=${id}` }) | ||||
| } | ||||
|  | ||||
| // 获得商品分类列表 | ||||
| export const getCategoryList = (params: any) => { | ||||
|   return request.get({ url: '/product/category/list', params }) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 芋道源码
					芋道源码