提交 5df6b067 编写于 作者: C chenqt

处理文档上传保存异常

上级 6cc27e51
......@@ -322,7 +322,7 @@ export default {
url: fileUrl,
name: _file.name
}
if (that.saveFile) that.saveFile(_data, _file);
if (that.savaFile) that.savaFile(_data, _file);
}).catch(error => {
that.fileUploading = false
console.error(error)
......@@ -372,6 +372,8 @@ export default {
},
// 保存文件
savaVideo(data, fileInfo) {
console.log('savaVideo', data, fileInfo)
console.log('refId', this.refId)
if (this.refId) {
const refId = this.refId === '0' ? undefined : this.refId
const form = {
......
......@@ -49,7 +49,7 @@ export default {
...res
}
console.log(res, _data)
if (that.saveFile) that.saveFile(_data, _file);
if (that.savaVideo) that.savaVideo(_data, _file);
if (callback) callback(_data)
}).catch(() => {
_file.status = 'saveFail'
......@@ -97,7 +97,7 @@ export default {
...res
}
console.log(res, _data)
if (that.saveFile) that.saveFile(_data, _file);
if (that.savaVideo) that.savaVideo(_data, _file);
if (callback) callback(_data)
}).catch(() => {
_file.status = 'fail'
......@@ -145,7 +145,7 @@ export default {
url: fileUrl,
name: _file.name
}
if (that.saveFile) that.saveFile(_data, _file);
if (that.savaVideo) that.savaVideo(_data, _file);
if (callback) callback(_data)
}).catch(error => {
that.fileUploading = false
......@@ -186,7 +186,7 @@ export default {
url: fileUrl,
name: _file.file.name
}
if (that.saveFile) that.saveFile(_data, _file);
if (that.savaVideo) that.savaVideo(_data, _file);
if (callback) callback(_data)
}).catch(error => {
if (error.status === 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册