Browse Source

文件预览问题

dev
long 2 years ago
parent
commit
287694904c
  1. 5
      src/components/jeecg/FileList.vue
  2. 5
      src/components/jeecg/JUpload.vue
  3. 2
      src/views/modules/oss/OSSFileList.vue

5
src/components/jeecg/FileList.vue

@ -337,8 +337,9 @@
var urlPath = file.url var urlPath = file.url
var group = file.groups var group = file.groups
var that = this var that = this
let base = "http://182.92.73.21:8012/onlinePreview?url=" let base = window._CONFIG['onlinePreviewDomainURL']
let url = base+encodeURIComponent(this.$Base64.encode(file.url)) console.log(base,"????????????????????????????")
let url = window._CONFIG['onlinePreviewDomainURL']+encodeURIComponent(this.$Base64.encode(file.url))
window.open(url, '_blank') window.open(url, '_blank')
}, },
handleCancel() { handleCancel() {

5
src/components/jeecg/JUpload.vue

@ -321,8 +321,9 @@
this.previewVisible = true; this.previewVisible = true;
}else if (file.url) { }else if (file.url) {
// base // base
let base = "http://182.92.73.21:8012/onlinePreview?url=" //let base = "http://182.92.73.21:8012/onlinePreview?url="
let url = base+encodeURIComponent(this.$Base64.encode(file.url)) console.log(window._CONFIG['onlinePreviewDomainURL'],"//////////////////////////????")
let url = window._CONFIG['onlinePreviewDomainURL']+encodeURIComponent(this.$Base64.encode(file.url))
window.open(url, '_blank') window.open(url, '_blank')
} }
}, },

2
src/views/modules/oss/OSSFileList.vue

@ -241,7 +241,7 @@
}, },
handlePreview(record) { handlePreview(record) {
if (record && record.url) { if (record && record.url) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(record.url) let url = window._CONFIG['onlinePreviewDomainURL']+encodeURIComponent(this.$Base64.encode(record.url))
window.open(url, '_blank') window.open(url, '_blank')
} }
}, },

Loading…
Cancel
Save