Commit 37b151fe authored by wangxl's avatar wangxl
parents a03bcae2 440f4590
...@@ -47,17 +47,14 @@ export default { ...@@ -47,17 +47,14 @@ export default {
} }
} }
}, },
uploadFile (obj, index) { uploadFile (obj, index) {
this.$api.base.asyncApplyBookUpload(this.uploadHandle(obj.file, obj.name)).then(({ data = {} }) => { this.$api.base.asyncApplyBookUpload(this.uploadHandle(obj.file, obj.name)).then(({ data = {} }) => {
if (data) { if (data) {
obj.fileName = files[0].name this.$message.success('上传成功!')
obj.downloadUrl = data.downloadUrl
obj.downloadId = data.id
} else } else
this.$message.error('上传失败') this.$message.error('上传失败1')
}).catch(() => { }).catch(() => {
this.$message.error('上传失败') this.$message.error('上传失败2')
}) })
}, },
uploadHandle (file, fileName) { uploadHandle (file, fileName) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment