【修改】去掉文件的查看base64加密

This commit is contained in:
fengachen
2021-12-28 20:30:03 +08:00
parent 05838615b8
commit 0a55b37bcd
2 changed files with 6 additions and 4 deletions
@@ -43,7 +43,7 @@ import { getFileInfo } from '@api/api'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
// eslint-disable-next-line
const Base64 = require('js-base64').Base64
// const Base64 = require('js-base64').Base64
export default {
name: 'SubBidCommitteeDetail',
@@ -128,7 +128,8 @@ export default {
handlePreview(file) {
if (file && file.id) {
const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ file.id }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ file.name }`
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
// let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(fileFullUrl) }`
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
window.open(url)
}