feat: 商品列表-单规格删除skulist
This commit is contained in:
parent
467bfaa2eb
commit
3f02f0e6c8
|
|
@ -86,6 +86,36 @@ export interface IContentConfig<T = any> {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
// 请求数据的参数
|
// 请求数据的参数
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
indexActionData: object | any,
|
indexActionData: object | any,
|
||||||
// 修改属性的网络请求函数(需返回promise)
|
// 修改属性的网络请求函数(需返回promise)
|
||||||
modifyAction?: (data: {
|
modifyAction?: (data: {
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,21 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
||||||
pageSizes: [10, 20, 30, 50],
|
pageSizes: [10, 20, 30, 50],
|
||||||
},
|
},
|
||||||
indexActionData: {},
|
indexActionData: {},
|
||||||
indexAction: function (params) {
|
indexAction: async function (params) {
|
||||||
let obj = { ...params, ...params.times }
|
let obj = { ...params, ...params.times }
|
||||||
obj.createBeginTime = obj['0']
|
obj.createBeginTime = obj['0']
|
||||||
obj.createEndTime = obj['1']
|
obj.createEndTime = obj['1']
|
||||||
return UserAPI.getPage(obj);
|
const res = await UserAPI.getPage(obj);
|
||||||
|
res.records.forEach((element: any) => {
|
||||||
|
if (element.type == "single") {
|
||||||
|
delete element.skuList
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
return resolve({
|
||||||
|
...res
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
modifyAction: function (data) {
|
modifyAction: function (data) {
|
||||||
let obj = {
|
let obj = {
|
||||||
|
|
@ -36,11 +46,6 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
||||||
// return UserAPI.onOff(obj);
|
// return UserAPI.onOff(obj);
|
||||||
},
|
},
|
||||||
deleteAction: UserAPI.deleteByIds,
|
deleteAction: UserAPI.deleteByIds,
|
||||||
// importAction(file) {
|
|
||||||
// return UserAPI.import(1, file);
|
|
||||||
// },
|
|
||||||
// exportAction: UserAPI.export,
|
|
||||||
// importTemplate: UserAPI.downloadTemplate,
|
|
||||||
importsAction(data) {
|
importsAction(data) {
|
||||||
// 模拟导入数据
|
// 模拟导入数据
|
||||||
console.log("importsAction", data);
|
console.log("importsAction", data);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue