Commit 436082f0 by 匡雅琴

营销素材PDF文件名带.导致文件上传错误问题解决

1 parent 308bab6f
......@@ -420,7 +420,8 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
// const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.slice(-3) + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
this.pdfUrl = res
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!