拆分图片修改

This commit is contained in:
caoyang
2022-06-10 12:54:45 +08:00
parent b8e0ee3a11
commit a2e22a7f55
2 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -299,7 +299,7 @@
eventBUs.$emit('searchReset')
this.$emit('addFormClick')
} else {
this.$message.warning(this.$t('operationFailed'))
this.$message.warning(this.$t(res.message))
}
})
} else {
@@ -630,7 +630,10 @@
if(res.success){
this.contentList=[...res.result]
this.contentList.forEach(item=>{
item.thumbUrl=window._CONFIG['domianURL']+'/sys/split/file/getImage?fileUrl='+Base64.encode(item.itemContent)
let imgData=item.itemContent.split('fileUrl=')[1]
// console.log('imgData',imgData)
item.thumbUrl=window._CONFIG['domianURL']+'/sys/split/file/getImage?fileUrl='+imgData
// item.thumbUrl=Base64.encode(item.itemContent)
})
// window._CONFIG['domianURL']+'/sys/split/file/getImage?fileUrl='+Base64.encode(file.response.result.url)
@@ -851,7 +854,7 @@
id:'',
type:'IMG',
itemContent:file.response.result.url,
thumbUrl:window._CONFIG['domianURL']+'/sys/split/file/getImage?fileUrl='+Base64.encode(file.response.result.url)
thumbUrl:window._CONFIG['domianURL']+'/sys/split/file/getImage?fileUrl='+file.response.result.url.split('fileUrl=')[1]
}
// console.log('baseDecode',Base64.decode(this.contentList[this.addIndex].thumbUrl))
@@ -879,10 +882,10 @@
// console.log('conteend',imgs,this.contentList)
},
//点击图片预览
preImg(item){
this.itemSrc=item.thumbUrl?item.thumbUrl:item.itemContent
this.preImgVisible=true
},
// preImg(item){
// this.itemSrc=item.thumbUrl?item.thumbUrl:item.itemContent
// this.preImgVisible=true
// },
//关闭预览图片
handlePreImgCancel(){
this.preImgVisible=false