把.env.development和.env.production的配置服务路径单独拿出,做成静态资源

This commit is contained in:
yaoyanan
2021-04-01 16:37:58 +08:00
parent 040a16bcb7
commit e407e8e426
15 changed files with 290 additions and 91 deletions
@@ -199,7 +199,7 @@
initWebSocket: function () {
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
var userId = store.getters.userInfo.id;
var url = window._CONFIG['domianURL'].replace("https://","wss://").replace("http://","ws://")+"/websocket/"+userId;
var url = window._CONFIG['domianWebSocketURL'].replace("https://","wss://").replace("http://","ws://")+"/websocket/"+userId;
//console.log(url);
this.websock = new WebSocket(url);
this.websock.onopen = this.websocketOnopen;