diff --git a/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue b/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue index 5db6dd33..b427a9e3 100644 --- a/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue +++ b/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue @@ -353,7 +353,13 @@ const fileUrl = `${globalSetting.domainUrl}${getDownWork}?id=${record.id}`; const extName = record.url.substring(record.url.lastIndexOf('.')); const previewUrl = `${fileUrl}&fullfilename=${new Date().getTime()}${extName}`; - window.open(previewServerUrl + encodeURIComponent(Base64.encode(previewUrl))); + window.open(previewServerUrl + encodeURIComponent(base64Encode(previewUrl))); + } + + function base64Encode(str: string): string { + return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) { + return String.fromCharCode('0x' + p1); + })); } function handleDown(record) {