parent
dd0cd666dc
commit
bfff1c3215
|
@ -20,10 +20,13 @@ watch(
|
||||||
deviceId.value = newId as string;
|
deviceId.value = newId as string;
|
||||||
_control(newId).then((resp: any) => {
|
_control(newId).then((resp: any) => {
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
const protocol = location.protocol
|
const item = `http://${resp.result?.url}/#/login?token=${resp.result.token}`;
|
||||||
const item = `${protocol}//${resp.result?.url}/#/login?token=${resp.result.token}`;
|
if(window.location.protocol === 'https:' && item){
|
||||||
|
window.open(item)
|
||||||
|
}else{
|
||||||
url.value = item;
|
url.value = item;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue