perf: console的url处理|assetbox保存时vendor闪动等

1.console的url处理
2.assetbox保存时vendor闪动的问题修复
3.优化侧滑动画
This commit is contained in:
chenjinsong
2020-05-22 15:21:41 +08:00
parent 9892cce975
commit a3ca1f9723
8 changed files with 112 additions and 35 deletions

View File

@@ -190,9 +190,13 @@ export default {
this.term.open(terminalContainer);
this.term.focus();
let token = sessionStorage.getItem('nz-token');
let baseUrl = this.$axios.defaults.baseURL.replace('http','ws');
let baseUrl = this.$axios.defaults.baseURL;
if (baseUrl.startsWith("/")) {
baseUrl = "ws://" + window.location.host + ":" + window.location.port + 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;
this.terminalSocket = new WebSocket(url);
//连接成功
this.terminalSocket.onopen = () =>{