Commit 4447bc4e by end

修改

parent 81675eed
......@@ -369,8 +369,21 @@ class App extends React.Component {
<Row gutter={12}>
<Col span={16}>
{getFieldDecorator("organizer", {
initialValue:
trainfirstinfo !== "" ? trainfirstinfo.organizer?.split(',') : [],
initialValue: (() => {
try {
if (trainfirstinfo !== "" && trainfirstinfo.organizer) {
// 尝试解析 JSON 字符串为数组
const parsedOrganizer = JSON.parse(trainfirstinfo.organizer);
// 确保解析结果是数组
if (Array.isArray(parsedOrganizer)) {
return parsedOrganizer;
}
}
} catch (error) {
console.error('解析组织方数据失败:', error);
}
return [];
})(),
rules: [
{
required: false,
......
......@@ -1178,7 +1178,7 @@ class NewTP extends Component {
},
],
activityAddress: values.activityAddress,
organizer: values.organizer,
organizer: JSON.stringify(values.organizer),
activityReward: values.activityReward,
// logo地址
logoImg: values.logo,
......@@ -1630,7 +1630,7 @@ class NewTP extends Component {
},
],
activityAddress: values.activityAddress,
organizer: values.organizer,
organizer: JSON.stringify(values.organizer),
activityReward: values.activityReward,
// logo地址
logoImg: this.state.logourl,
......
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