Browse Source

解决KKFile预览服务中文字符和缓存问题

han_v2
han2015 6 months ago
parent
commit
a209087293
  1. 18
      src/views/doc/share.vue

18
src/views/doc/share.vue

@ -103,12 +103,22 @@ function onShareMember(row:matterInfo){
//
function onShareView(row:matterInfo){
if(row.name.endsWith('...')){
row.name="archive.zip"
let a=row.name;
if(a.endsWith('...')){
a=`${row.uuid}-${row.code}.zip`
}
let _url=`${siteHost}${apiURL}/share/zip?shareUuid=${row.uuid}&code=${row.code}&puuid=root&rootUuid=root&fullfilename=${row.name}`
//
a=a.match("(\.[a-zA-Z]+)$")
if (a && a.length>0) {
a=`${row.uuid}-${row.code}${a[0]}`
}else{
a=`${row.uuid}${row.name}`
}
let _url=`${siteHost}${apiURL}/share/zip?shareUuid=${row.uuid}&code=${row.code}&uid=${uid}&puuid=root&rootUuid=root&fullfilename=${a}`
dynamicVNode.value=h(preview,{
url:`${officeHost}/onlinePreview?url=`+encodeURIComponent(btoa(_url)),
url:`${officeHost}/onlinePreview?url=`+window.btoa(unescape(encodeURIComponent(_url))),
closeFunc:()=>dynamicVNode.value=null
})
}

Loading…
Cancel
Save