fix openInClientBug

This commit is contained in:
CaiHQ 2021-10-26 14:17:31 +08:00
parent e96048de2a
commit c73d1cfabf

View File

@ -173,9 +173,13 @@ function importContractInstanceCodeByDOI() {
} }
function openInClient() { function openInClient() {
let path = document.location.pathname.lastIndexOf("/ide");
if (path>0)
path = document.location.pathname.substr(0, path + 1);
else path = "/";
window.open(isBaaS ? window.open(isBaaS ?
`${location.origin}/client/BaaSClient.html${location.search}` : `${location.origin}${path}client/BaaSClient.html${location.search}` :
`${location.origin}/client/bdwareclient.html?self=true&` + `${location.origin}${path}client/bdwareclient.html?self=true&` +
`contract=${mainVue.contracts[selectedContract.value].id}`); `contract=${mainVue.contracts[selectedContract.value].id}`);
} }