文件预览加解密默认修改
This commit is contained in:
parent
59a9cd2f90
commit
9ce9c39cbd
|
|
@ -12,7 +12,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { filePreview, lookFaceFile, lookFile, lookMioIoFile } from '@/utils/bonus' // Assuming Base64 is saved as a separate module
|
import { filePreview, lookFaceFile, lookFile, lookMioIoFile } from '@/utils/bonus' // Assuming Base64 is saved as a separate module
|
||||||
import useBase64 from '@/api/base64Utils'
|
import useBase64 from '@/api/base64Utils'
|
||||||
import { encryptCBC } from '@/utils/aescbc'
|
import { encryptCBC, encryptCBCTime } from '@/utils/aescbc'
|
||||||
import { downloadFile } from '@/api/tool/select'
|
import { downloadFile } from '@/api/tool/select'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -78,7 +78,7 @@ export default {
|
||||||
|
|
||||||
let fileUploadPath = filePath
|
let fileUploadPath = filePath
|
||||||
let filePreviewPath
|
let filePreviewPath
|
||||||
let time = encryptCBC(Math.floor(Date.now()).toString())
|
let time = encryptCBCTime(Math.floor(Date.now()).toString())
|
||||||
if (suffix.toLowerCase() === 'pdf') {
|
if (suffix.toLowerCase() === 'pdf') {
|
||||||
filePreviewPath = filePath.includes('http') ? filePath : `${this.lookFile}/${filePath}`
|
filePreviewPath = filePath.includes('http') ? filePath : `${this.lookFile}/${filePath}`
|
||||||
this.showDownloadButton = false
|
this.showDownloadButton = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue