feat:【antd】【mall】积分商城活动优化

pull/282/head
puhui999 2025-11-26 16:40:13 +08:00
parent 0ded54872b
commit 4f45438e11
2 changed files with 2 additions and 22 deletions

View File

@ -101,23 +101,13 @@ const [Modal, modalApi] = useVbenModal({
async onOpenChange(isOpen: boolean) { async onOpenChange(isOpen: boolean) {
if (!isOpen) { if (!isOpen) {
// //
// TODO @puhui999105 108
formData.value = {
descriptionScores: 5,
benefitScores: 5,
} as Partial<MallCommentApi.Comment>;
selectedSku.value = undefined; selectedSku.value = undefined;
return; return;
} }
// //
const data = modalApi.getData<MallCommentApi.Comment>(); const data = modalApi.getData<MallCommentApi.Comment>();
if (!data || !data.id) { if (!data || !data.id) {
// TODO @puhui999115 121
// //
formData.value = {
descriptionScores: 5,
benefitScores: 5,
} as Partial<MallCommentApi.Comment>;
selectedSku.value = undefined; selectedSku.value = undefined;
await formApi.setValues({ spuId: undefined, skuId: undefined }); await formApi.setValues({ spuId: undefined, skuId: undefined });
return; return;

View File

@ -180,26 +180,16 @@ const [Modal, modalApi] = useVbenModal({
}, },
async onOpenChange(isOpen: boolean) { async onOpenChange(isOpen: boolean) {
if (!isOpen) { if (!isOpen) {
//
formData.value = undefined; formData.value = undefined;
spuList.value = []; spuList.value = [];
spuPropertyList.value = []; spuPropertyList.value = [];
return; return;
} }
//
// TODO @puhui999 183 185
formData.value = undefined;
spuList.value = [];
spuPropertyList.value = [];
// //
const data = modalApi.getData<MallPointActivityApi.PointActivity>(); const data = modalApi.getData<MallPointActivityApi.PointActivity>();
if (!data || !data.id) { if (!data || !data.id) {
//
// TODO @puhui999197 201 setValues
await formApi.setValues({
sort: 0,
remark: '',
spuId: undefined,
});
return; return;
} }
// //