|
@@ -90,39 +90,39 @@ const Basic = (props) => {
|
90
|
90
|
{required: true, message: '请选择资讯类型'},
|
91
|
91
|
]
|
92
|
92
|
},
|
93
|
|
- // {
|
94
|
|
- // label: '资讯详情',
|
95
|
|
- // name: 'newsDetailType',
|
96
|
|
- // render: <Radio.Group>
|
97
|
|
- // <Radio value={1}>自定义</Radio>
|
98
|
|
- // <Radio value={0}>公众号链接</Radio>
|
99
|
|
- // </Radio.Group>,
|
100
|
|
- // value: dynamicData.newsDetailType - 0,
|
101
|
|
- // rules: [
|
102
|
|
- // {required: true, message: '请选择资讯类型'},
|
103
|
|
- // ]
|
104
|
|
- // },
|
|
93
|
+ {
|
|
94
|
+ label: '资讯详情',
|
|
95
|
+ name: 'newsDetailType',
|
|
96
|
+ render: <Radio.Group>
|
|
97
|
+ <Radio value={1}>自定义</Radio>
|
|
98
|
+ <Radio value={0}>公众号链接</Radio>
|
|
99
|
+ </Radio.Group>,
|
|
100
|
+ value: dynamicData.newsDetailType !== undefined && dynamicData.newsDetailType !== null ? dynamicData.newsDetailType - 0 : 1,
|
|
101
|
+ rules: [
|
|
102
|
+ {required: true, message: '请选择资讯类型'},
|
|
103
|
+ ]
|
|
104
|
+ },
|
105
|
105
|
{
|
106
|
106
|
label: '资讯详情',
|
107
|
107
|
name: 'newsDetail',
|
108
|
108
|
render: <Wangedit />,
|
109
|
|
- // hidden: () => !detailVisible,
|
|
109
|
+ hidden: () => !detailVisible,
|
110
|
110
|
value: dynamicData.newsDetail,
|
111
|
111
|
rules: [
|
112
|
112
|
{required: true, message: '请输入详情内容'},
|
113
|
113
|
]
|
114
|
114
|
},
|
115
|
|
- // {
|
116
|
|
- // label: '公众号链接',
|
117
|
|
- // name: 'newsDetail',
|
118
|
|
- // type: FieldTypes.Text,
|
119
|
|
- // hidden: () => !urlVisible,
|
120
|
|
- // value: dynamicData.newsDetail,
|
121
|
|
- // help: "只能填写同一主体公众号的文章链接",
|
122
|
|
- // rules: [
|
123
|
|
- // {required: true, message: '请输入公众号链接'},
|
124
|
|
- // ]
|
125
|
|
- // },
|
|
115
|
+ {
|
|
116
|
+ label: '公众号链接',
|
|
117
|
+ name: 'newsDetail',
|
|
118
|
+ type: FieldTypes.Text,
|
|
119
|
+ hidden: () => !urlVisible,
|
|
120
|
+ value: dynamicData.newsDetail,
|
|
121
|
+ help: "只能填写同一主体公众号的文章链接",
|
|
122
|
+ rules: [
|
|
123
|
+ {required: true, message: '请输入公众号链接'},
|
|
124
|
+ ]
|
|
125
|
+ },
|
126
|
126
|
]
|
127
|
127
|
|
128
|
128
|
const handleSubmit = val => {
|
|
@@ -178,8 +178,8 @@ const Basic = (props) => {
|
178
|
178
|
// 查询列表
|
179
|
179
|
const getDynamicData = (newsId) => {
|
180
|
180
|
request({ ...apis.news.get, urlData: { id: newsId },}).then((data) => {
|
181
|
|
- setDynamicData(data)
|
182
|
181
|
setExtraData(data)
|
|
182
|
+ setDynamicData(data)
|
183
|
183
|
// detailVisible = data.newsDetailType == '1'
|
184
|
184
|
// urlVisible = data.newsDetailType == '0'
|
185
|
185
|
}).catch((err) => {
|