Commit 37b151fe authored by wangxl's avatar wangxl
parents a03bcae2 440f4590
......@@ -47,17 +47,14 @@ export default {
}
}
},
uploadFile (obj, index) {
this.$api.base.asyncApplyBookUpload(this.uploadHandle(obj.file, obj.name)).then(({ data = {} }) => {
if (data) {
obj.fileName = files[0].name
obj.downloadUrl = data.downloadUrl
obj.downloadId = data.id
this.$message.success('上传成功!')
} else
this.$message.error('上传失败')
this.$message.error('上传失败1')
}).catch(() => {
this.$message.error('上传失败')
this.$message.error('上传失败2')
})
},
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