|
|
|
@ -168,21 +168,29 @@ function VideoUploadList (props) {
|
|
|
|
|
const _input = document.getElementById('fileUpload')
|
|
|
|
|
_input.value = ''
|
|
|
|
|
}
|
|
|
|
|
// uploader.deleteFile(index);
|
|
|
|
|
function cancelUpload(index, isSuccess) {
|
|
|
|
|
// TODO 确定取消?
|
|
|
|
|
function doDelete(index, isSuccess) {
|
|
|
|
|
uploader.deleteFile(index)
|
|
|
|
|
// uploader.cancelFile(index)
|
|
|
|
|
if (isSuccess) {
|
|
|
|
|
deleteVideoInCloud(username, state.videoes[index].videoId)
|
|
|
|
|
}
|
|
|
|
|
// else {
|
|
|
|
|
// uploader.cancelFile(index)
|
|
|
|
|
// }
|
|
|
|
|
clearInput()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clearInput()
|
|
|
|
|
dispatch({type: 'removeVideo', index})
|
|
|
|
|
// setVideoes([...videoes.splice(index, 1)])
|
|
|
|
|
}
|
|
|
|
|
// uploader.deleteFile(index);
|
|
|
|
|
function cancelUpload(index, isSuccess) {
|
|
|
|
|
props.confirm({
|
|
|
|
|
content: <div>
|
|
|
|
|
<div>您确认要{isSuccess ? '删除' : '取消上传'}该视频吗?</div>
|
|
|
|
|
</div>,
|
|
|
|
|
onOk: () => {
|
|
|
|
|
doDelete(index, isSuccess)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function onPublish() {
|
|
|
|
|
if (state.videoes.length == 0) {
|
|
|
|
|
showNotification('请先上传视频')
|
|
|
|
|