Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #99 from Jzow/master
Browse files Browse the repository at this point in the history
Add product info modal views item
  • Loading branch information
Jzow authored Oct 18, 2023
2 parents 2a4d509 + 8deb3c3 commit 01635f4
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 42 deletions.
1 change: 1 addition & 0 deletions src/api/product/model/productCategoryModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface ProductCategoryResp {
remark: string;
sort: number;
createTime: string;
children?: ProductCategoryResp[];
}

export interface AddOrUpdateProductCategoryReq {
Expand Down
12 changes: 12 additions & 0 deletions src/api/product/productAttribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ enum Api {
List = '/product/attribute/list',
addOrUpdate = '/product/attribute/addOrUpdate',
deleteBatch = '/product/attribute/deleteBatch',
GetAttributeById = '/product/attribute/getValuesById',
}

export function getAttributeList(params: ProductAttributeListReq ,mode: ErrorMessageMode = 'notice') {
Expand Down Expand Up @@ -43,4 +44,15 @@ export function deleteBatchAttribute(ids: number[], mode: ErrorMessageMode = 'no
errorMessageMode: mode,
},
);
}

export function getAttributeById(id: number, mode: ErrorMessageMode = 'notice') {
return defHttp.get<BaseDataResp<ProductAttributeResp>>(
{
url: `${Api.GetAttributeById}?id=${id}`
},
{
errorMessageMode: mode,
},
);
}
Loading

0 comments on commit 01635f4

Please sign in to comment.