Skip to content

Commit

Permalink
fix: update open url
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuangs committed Aug 9, 2024
1 parent 7879789 commit 511ee26
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/frontend/src/pages/Search/TextSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,26 +235,30 @@ const keydownEnter = (event: any) => {
};
const open = (item: any) => {
console.log('itemitem', item);
if (props.item?.name === 'Drive') {
const url = '/Files' + item.path;
const filesApp = props.commandList?.find(
(el: { appid: string }) => el.appid && el.appid === 'files'
);
filesApp.url = filesApp.url + url;
window.open(filesApp.url);
const openUrl = filesApp.url.startsWith('https')
? filesApp.url
: 'https://' + filesApp.url;
window.open(openUrl);
} else if (props.item?.name === 'Wise') {
const filesApp = props.commandList?.find(
(el: { appid: string }) => el.appid && el.appid === 'wise'
);
console.log('filesAppfilesApp', filesApp);
filesApp.url =
filesApp.url + '/' + item.meta.file_type + '/' + item.meta.id;
window.open(filesApp.url);
const openUrl = filesApp.url.startsWith('https')
? filesApp.url
: 'https://' + filesApp.url;
window.open(openUrl);
}
// emits('openCommand', resource_uri);
Expand Down

0 comments on commit 511ee26

Please sign in to comment.