|
@@ -184,13 +184,34 @@ var beautyArchiveDetailMixin = {
|
|
|
handlePlayer: function () {
|
|
|
if (!this.isPlayer) this.currentVideo.play();
|
|
|
},
|
|
|
+ myDecrypt (word, iv = CryptoJS.enc.Utf8.parse('caimei--20240103'), key = CryptoJS.enc.Utf8.parse("caimei--20240103")) {
|
|
|
+ if (word) {
|
|
|
+ return word.map(e => {
|
|
|
+ if (e) {
|
|
|
+ const encryptedHexStr = CryptoJS.enc.Base64.parse(e);
|
|
|
+ const srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr);
|
|
|
+ const decrypt = CryptoJS.AES.decrypt(srcs, key, {
|
|
|
+ iv,
|
|
|
+ mode: CryptoJS.mode.CBC,
|
|
|
+ padding: CryptoJS.pad.NoPadding
|
|
|
+ });
|
|
|
+ const decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
|
|
|
+ return decryptedStr.toString()
|
|
|
+ } else return ''
|
|
|
+ })
|
|
|
+ } else return []
|
|
|
+ },
|
|
|
//预览office文件 word ppt pdf
|
|
|
handlePreviewOffice: function (file) {
|
|
|
if (file) {
|
|
|
this.GetStatisticsAddPv(1, file.archiveContentId)
|
|
|
}
|
|
|
+ const link = this.myDecrypt([file.fileUrl])[0].split('?')[0]
|
|
|
+ console.log(link)
|
|
|
+ if (this.checkPermission() !== 0) return;
|
|
|
+ // window.open(`http://127.0.0.1:5173/preview?t=3&url=${link}&isSp=1`)
|
|
|
const domainUrl = isDev ? 'https://material-b.caimei365.com' : 'https://material.caimei365.com'
|
|
|
- window.open(`${domainUrl}/preview?t=3&url=${file.fileUrl}&isSp=1`)
|
|
|
+ window.open(`${domainUrl}/preview?t=3&url=${link}&isSp=1`)
|
|
|
// if (this.checkPermission() !== 0) return;
|
|
|
// var index = file.fileName.lastIndexOf('.');
|
|
|
// var suffix = file.fileName.substring(index);
|