素材库
This commit is contained in:
@@ -350,14 +350,29 @@ export default {
|
||||
this.$message.success('上传成功')
|
||||
return false
|
||||
}
|
||||
let data = res.data[0].split(';')
|
||||
this.fileList.forEach(item => {
|
||||
if (item.uid === file.file.uid) {
|
||||
item.id = data[1]
|
||||
item.path = data[0]
|
||||
item.url = data[0]
|
||||
}
|
||||
})
|
||||
|
||||
if (Object.prototype.toString.call(res.data) === '[object Object]') {
|
||||
this.fileList.forEach(item => {
|
||||
if (item.uid === file.file.uid) {
|
||||
item.id = res.data.id
|
||||
item.path = res.data.url
|
||||
item.url = res.data.url
|
||||
item.url = res.data.url
|
||||
item.fileSizeStr = res.data.fileSizeStr
|
||||
item.postfix = res.data.postfix
|
||||
}
|
||||
})
|
||||
} else {
|
||||
let data = res.data[0].split(';')
|
||||
this.fileList.forEach(item => {
|
||||
if (item.uid === file.file.uid) {
|
||||
item.id = data[1]
|
||||
item.path = data[0]
|
||||
item.url = data[0]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.emitChange(this.fileList)
|
||||
this.$message.success('上传成功')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user