diff --git a/web/client/src/sections/fillion/actions/infor.js b/web/client/src/sections/fillion/actions/infor.js index 83837a88..b06d0c5f 100644 --- a/web/client/src/sections/fillion/actions/infor.js +++ b/web/client/src/sections/fillion/actions/infor.js @@ -343,7 +343,7 @@ export function putAddPropagata (query) { data: query, actionType: 'PUT_PROPAGATA', url: ApiTable.putpropagata, - msg: { error: '新增宣传视频信息失败' }, + msg: { option: '新增宣传视频' }, // reducer: { name: 'reportstatistic' } }); } @@ -354,7 +354,7 @@ export function putEditPropagata (query) { data: query, actionType: 'PUT_PROPAGATA', url: ApiTable.putpropagata, - msg: { error: '编辑宣传视频信息失败' }, + msg: { option: '编辑宣传视频' }, // reducer: { name: 'reportstatistic' } }); } @@ -364,7 +364,7 @@ export function delPropagata (query) { dispatch: dispatch, actionType: 'DEL_PROPAGATA', url: ApiTable.delpropagata.replace("{publicityId}", query?.publicityId), - msg: { error: '删除宣传视频信息失败' }, + msg: { option: '删除宣传视频信息' }, // reducer: { name: 'reportstatistic' } }); } \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/infor/videoUpload.js b/web/client/src/sections/fillion/components/infor/videoUpload.js index 0bfc3c40..2f1a5607 100644 --- a/web/client/src/sections/fillion/components/infor/videoUpload.js +++ b/web/client/src/sections/fillion/components/infor/videoUpload.js @@ -9,7 +9,6 @@ import { getPropagata } from '../../actions/infor'; const VideoUpload = (props) => { - const { dispatch, record, counts, setCounts } = props const [form] = Form.useForm(); @@ -20,11 +19,9 @@ const VideoUpload = (props) => { } const showModalEdit = () => { - setIsModalVisible(true); }; - //新增 const handleOkAdd = () => { form.validateFields().then((values) => { @@ -49,24 +46,28 @@ const VideoUpload = (props) => { form.validateFields().then((values) => { const videoname = values.username const id = record.id - const video = record.video - - const data = { publicityId: id, name: videoname, video: video } + const newVideoAddress = values.video.map((item) => { + return item.storageUrl + }) + const data = { publicityId: id, name: videoname, video: newVideoAddress } dispatch(putEditPropagata(data)).then(() => { dispatch(getPropagata()).then((res) => { setCounts(res.payload.data) - + console.log(data); }) }) - + setIsModalVisible(false); } ); - setIsModalVisible(false); }; const handleCancel = () => { setIsModalVisible(false); }; + const handleCancelEdit = () => { + setIsModalVisible(false); + form.resetFields() + }; const onFinish = (values) => { console.log('Success:', values); @@ -80,7 +81,7 @@ const VideoUpload = (props) => {
{ props.type_ys ?
- +
{ ]} > @@ -178,9 +179,15 @@ const VideoUpload = (props) => {