1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

repair weixin lib search bug (#4173)

This commit is contained in:
杨顺强
2019-10-22 12:01:00 +08:00
committed by Daniel Pan
parent eab949c482
commit 0c8d221a45

View File

@@ -797,8 +797,13 @@ class LibContentView extends React.Component {
this.showFile(path); this.showFile(path);
} else { } else {
let url = siteRoot + 'lib/' + item.repo_id + '/file' + Utils.encodePath(path); let url = siteRoot + 'lib/' + item.repo_id + '/file' + Utils.encodePath(path);
let newWindow = window.open('about:blank'); let isWeChat = Utils.isWeChat();
newWindow.location.href = url; if (!isWeChat) {
let newWindow = window.open('about:blank');
newWindow.location.href = url;
} else {
location.href = url;
}
} }
} }
} else { } else {
@@ -806,8 +811,13 @@ class LibContentView extends React.Component {
this.showDir(path); this.showDir(path);
} else { } else {
let url = siteRoot + 'lib/' + item.repo_id + '/file' + Utils.encodePath(path); let url = siteRoot + 'lib/' + item.repo_id + '/file' + Utils.encodePath(path);
let newWindow = window.open('about:blank'); let isWeChat = Utils.isWeChat();
newWindow.location.href = url; if (!isWeChat) {
let newWindow = window.open('about:blank');
newWindow.location.href = url;
} else {
location.href = url;
}
} }
} }
} }
@@ -1069,6 +1079,7 @@ class LibContentView extends React.Component {
this.showColumnMarkdownFile(direntPath); this.showColumnMarkdownFile(direntPath);
} else { } else {
const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(direntPath); const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(direntPath);
let isWeChat = Utils.isWeChat(); let isWeChat = Utils.isWeChat();
if (!isWeChat) { if (!isWeChat) {
let newWindow = window.open('about:blank'); let newWindow = window.open('about:blank');