|
@@ -22,6 +22,8 @@ const { TextArea } = Input;
|
22
|
22
|
|
23
|
23
|
const header = props => {
|
24
|
24
|
const [isEnlist, setIsEnlist] = useState(1)
|
|
25
|
+ // 新增成功后拿到返回的ID
|
|
26
|
+ const [helpId, setHelpId] = useState()
|
25
|
27
|
const [activityStatus, setActivityStatus] = useState(1)
|
26
|
28
|
const [disable, setDisable] = useState(false)
|
27
|
29
|
|
|
@@ -121,6 +123,12 @@ const header = props => {
|
121
|
123
|
})
|
122
|
124
|
} else {
|
123
|
125
|
request({ ...apis.helpActivity.add, data: submitValue }).then((data) => {
|
|
126
|
+ router.push({
|
|
127
|
+ pathname: '/activity/helpActivity/edithelpActivity',
|
|
128
|
+ query: {
|
|
129
|
+ helpActivityId: data,
|
|
130
|
+ },
|
|
131
|
+ });
|
124
|
132
|
message.info("保存成功")
|
125
|
133
|
// cancelPage()
|
126
|
134
|
}).catch((err) => {
|
|
@@ -289,11 +297,13 @@ const Edit = props => {
|
289
|
297
|
// const [help, helpTab] = useState('1')
|
290
|
298
|
const { helpActivityId } = props.location.query
|
291
|
299
|
const [dynamicData, setDynamicData] = useState({ isEnlist: 1 })
|
292
|
|
- if (helpActivityId) {
|
|
300
|
+
|
293
|
301
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
294
|
302
|
useEffect(() => {
|
295
|
303
|
// eslint-disable-next-line no-use-before-define
|
|
304
|
+ if (helpActivityId) {
|
296
|
305
|
getDynamicData(helpActivityId);
|
|
306
|
+ }
|
297
|
307
|
}, [])
|
298
|
308
|
|
299
|
309
|
// 详情
|
|
@@ -303,7 +313,7 @@ const Edit = props => {
|
303
|
313
|
setDynamicData(data)
|
304
|
314
|
})
|
305
|
315
|
}
|
306
|
|
- }
|
|
316
|
+
|
307
|
317
|
|
308
|
318
|
const cancelPage = () => {
|
309
|
319
|
router.push({
|