预览压缩包时,如果点击的是文件目录(树节点),页面会报错。所以加上判断,只有叶子节点才去预览文件
parent
3f47bb32a0
commit
6e1148ffc9
|
@ -51,8 +51,10 @@
|
|||
};
|
||||
|
||||
function chooseNode(event, treeId, treeNode) {
|
||||
var path = '${baseUrl}' + treeNode.id +"?fileKey="+'${fileName}';
|
||||
location.href = "${baseUrl}onlinePreview?url=" + encodeURIComponent(Base64.encode(path));
|
||||
if (!treeNode.isParent) {
|
||||
var path = '${baseUrl}' + treeNode.id + "?fileKey=" + '${fileName}';
|
||||
location.href = "${baseUrl}onlinePreview?url=" + encodeURIComponent(Base64.encode(path));
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
|
Loading…
Reference in New Issue