移动端品牌活动图片预览整改

This commit is contained in:
2026-11-06 11:08:55 +08:00
parent 0a431bf86e
commit 360ce71f0b
2 changed files with 40 additions and 3 deletions
@@ -347,6 +347,19 @@ module.exports = {
// 预览图片
handlePreview(file) {
if (this.upload_mode === "image") {
// 回显记录的名称可能是无扩展名的下载地址;图片模式直接预览缩略图地址。
const url = file.url || (this.upload_result_type === "url" && file.response?.data)
if (!url) {
this.$message.warning("暂无可预览的图片")
return
}
const image = new Image()
image.src = url
const viewer = new Viewer(image, {zIndex: 99999, title: false, hidden: () => viewer.destroy()})
viewer.show()
return
}
const suffix = file.name.substring(file.name.lastIndexOf(".") + 1).toLowerCase()
const fileId = file.response.data.substring(file.response.data.lastIndexOf("=") + 1)
const buildFile = {