fix: 修复https下无法访问网关远程控制

This commit is contained in:
xieyonghong 2023-05-15 15:40:59 +08:00
parent 19d7fadfbe
commit 7b4fb484bf
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ watch(
deviceId.value = newId as string;
_control(newId).then((resp: any) => {
if (resp.status === 200) {
const item = `http://${resp.result?.url}/#/login?token=${resp.result.token}`;
const protocol = location.protocol
const item = `${protocol}//${resp.result?.url}/#/login?token=${resp.result.token}`;
url.value = item;
}
});