【功能优化】添加商品属性时允许选择已有的属性值,点击「选择」后,获取 value 列表

This commit is contained in:
YunaiV
2024-08-14 13:06:23 +08:00
parent 879870ee26
commit 521ae46cba
5 changed files with 16 additions and 38 deletions

View File

@ -24,20 +24,6 @@ export interface PropertyValueVO {
remark?: string
}
/**
* 商品属性值的明细
*/
export interface PropertyValueDetailVO {
/** 属性项的编号 */
propertyId: number // 属性的编号
/** 属性的名称 */
propertyName: string
/** 属性值的编号 */
valueId: number
/** 属性值的名称 */
valueName: string
}
// ------------------------ 属性项 -------------------
// 创建属性项
@ -96,3 +82,8 @@ export const updatePropertyValue = (data: PropertyValueVO) => {
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 } })
}