图片预览优化

This commit is contained in:
2022-02-23 17:07:14 +08:00
parent 103679c372
commit d9748d0827

View File

@@ -45,27 +45,27 @@
}
}
},
methods: {
showImage(path) {
uni.previewImage({
urls: [
path
]
})
methods: {
showImage(path) {
uni.previewImage({
urls: [
path
]
})
},
previewImage() {
previewImage() {
if (this.content.local && this.content.local.indexOf('///data/user/') < 0) {
this.showImage(this.content.local)
} else {
this.showImage(this.content.remote)
RongIMLib.downloadMediaMessage(this.message.messageId, {
success: (path) => {
this.content.local = path
this.showImage(path)
},
error: (errorCode, messageId) => {
uni.showToast({
icon: 'none',
title: errorCode
error: (errorCode, messageId) => {
uni.showToast({
icon: 'none',
title: errorCode
})
}
})