perf: 静态资源路径更改、黑窗url更改

This commit is contained in:
chenjinsong
2020-05-25 10:06:18 +08:00
parent a3ca1f9723
commit 61dcc978a4
6 changed files with 222 additions and 159 deletions

View File

@@ -192,11 +192,12 @@ export default {
let token = sessionStorage.getItem('nz-token');
let baseUrl = this.$axios.defaults.baseURL;
if (baseUrl.startsWith("/")) {
baseUrl = "ws://" + window.location.host + ":" + window.location.port + baseUrl;
baseUrl = "ws://" + window.location.host + baseUrl;
} else {
baseUrl = baseUrl.replace("http://", "ws://").replace("https://", "ws://");
}
let url = baseUrl+"/terminal.ws?width="+this.terminal.width+"&height="+this.terminal.height+"&cols="+this.terminal.cols+"&rows="+this.terminal.rows+"&token="+token+"&assetId="+this.terminal.assetId+"&accountId="+this.terminal.accountId+"&uuid="+this.terminal.uuid;
console.info(baseUrl, url);
this.terminalSocket = new WebSocket(url);
//连接成功
this.terminalSocket.onopen = () =>{