Commit e5d4e79b authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复fetch init字段对不上导致数据出不来的问题

parent 8f0ba24b
......@@ -299,17 +299,16 @@ const DeliverCoupon: React.FC<IProps> = (props) => {
});
if (res.code === 1000) {
const { data = {} }: any = res;
const {
memberTypes = [],
levels = [],
suitableMemberTypes = [],
} = data;
} = res.data;
return {
memberType: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
memberTypeEnum: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
level: levels.map(item => ({ label: item.levelTag, value: item.level })),
suitableMemberType: suitableMemberTypes.map(item => ({ label: item.name, value: item.value })),
suitableMemberType: suitableMemberTypes?.map(item => ({ label: item.name, value: item.value })),
};
}
return {};
......@@ -406,7 +405,7 @@ const DeliverCoupon: React.FC<IProps> = (props) => {
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberType', 'level', 'suitableMemberType'],
['memberTypeEnum', 'level', 'suitableMemberType'],
fetchSelectOptions,
);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment