mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-10-31 18:28:44 +08:00 
			
		
		
		
	商品管理: 调整相关组件优化逻辑,完成表单保存和数据回显
This commit is contained in:
		| @@ -13,3 +13,7 @@ export const createSpu = (data: SpuType) => { | ||||
| export const updateSpu = (data: SpuType) => { | ||||
|   return request.put({ url: '/product/spu/update', data }) | ||||
| } | ||||
| // 获得商品spu | ||||
| export const getSpu = (id: number) => { | ||||
|   return request.get({ url: `/product/spu/get-detail?id=${id}` }) | ||||
| } | ||||
|   | ||||
| @@ -11,6 +11,10 @@ export interface Property { | ||||
|    * 关联 {@link ProductPropertyValueDO#getId()} | ||||
|    */ | ||||
|   valueId?: number | ||||
|   /** | ||||
|    * 属性值名称 | ||||
|    */ | ||||
|   valueName?: string | ||||
| } | ||||
|  | ||||
| export interface SkuType { | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| import { SkuType } from './skuType' | ||||
|  | ||||
| export interface SpuType { | ||||
|   id?: number | ||||
|   name?: string // 商品名称 | ||||
|   categoryId?: number | null // 商品分类 | ||||
|   keyword?: string // 关键字 | ||||
| @@ -11,7 +12,7 @@ export interface SpuType { | ||||
|   deliveryTemplateId?: number // 运费模版 | ||||
|   specType?: boolean // 商品规格 | ||||
|   subCommissionType?: boolean // 分销类型 | ||||
|   skus?: SkuType[] // sku数组 | ||||
|   skus: SkuType[] // sku数组 | ||||
|   description?: string // 商品详情 | ||||
|   sort?: string // 商品排序 | ||||
|   giveIntegral?: number // 赠送积分 | ||||
|   | ||||
| @@ -71,8 +71,8 @@ export const getPropertyList = (params: any) => { | ||||
| } | ||||
|  | ||||
| // 获得属性项列表 | ||||
| export const getPropertyListAndValue = (params: any) => { | ||||
|   return request.get({ url: '/product/property/get-value-list', params }) | ||||
| export const getPropertyListAndValue = (data: any) => { | ||||
|   return request.post({ url: '/product/property/get-value-list', data }) | ||||
| } | ||||
|  | ||||
| // ------------------------ 属性值 ------------------- | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 puhui999
					puhui999