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 group = file.groups
var that = this
let base = "http://182.92.73.21:8012/onlinePreview?url="
let url = base+encodeURIComponent(this.$Base64.encode(file.url))
let base = window._CONFIG['onlinePreviewDomainURL']
console.log(base,"????????????????????????????")
let url = window._CONFIG['onlinePreviewDomainURL']+encodeURIComponent(this.$Base64.encode(file.url))
window.open(url, '_blank')
},
handleCancel() {

5
src/components/jeecg/JUpload.vue

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

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

@ -241,7 +241,7 @@
},
handlePreview(record) {
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')
}
},

Loading…
Cancel
Save