文件预览不能使用

main
王家东 4 months ago
parent ceae62ff4a
commit 514f53c606
  1. 8
      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) {

Loading…
Cancel
Save