mirror of
https://gitee.com/yudaocode/yudao-ui-admin-vben.git
synced 2025-12-30 10:32:25 +00:00
feat:【antd】【mall】rewardActivity 优化完善
This commit is contained in:
@@ -73,23 +73,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
item.limit = convertToInteger(item.limit || 0);
|
||||
}
|
||||
});
|
||||
// 设置 productScopeValues
|
||||
switch (data.productScope) {
|
||||
// TODO @puhui999:这里要不要搞成类似优惠劵的
|
||||
case PromotionProductScopeEnum.CATEGORY.scope: {
|
||||
const categoryIds = data.productCategoryIds;
|
||||
data.productScopeValues = Array.isArray(categoryIds)
|
||||
? categoryIds
|
||||
: categoryIds
|
||||
? [categoryIds]
|
||||
: [];
|
||||
break;
|
||||
}
|
||||
case PromotionProductScopeEnum.SPU.scope: {
|
||||
data.productScopeValues = data.productSpuIds;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// productScopeValues 已通过 data.ts 中的 dependencies.trigger 自动同步到表单值中
|
||||
await (data.id
|
||||
? updateRewardActivity(data as MallRewardActivityApi.RewardActivity)
|
||||
: createRewardActivity(data as MallRewardActivityApi.RewardActivity));
|
||||
|
||||
Reference in New Issue
Block a user