zrg
10 小时以前 9b2bf18d4be98e8da39b01e6efbd726a76c45428
utils/common.js
@@ -494,6 +494,21 @@
            return item[e.ColmCols]
        })
    }
    httpFormatWs(httpUrl=this.serverUrl) {
        console.log('httpUrl: ',httpUrl);
        if(httpUrl.indexOf("http://") === 0){
            httpUrl = httpUrl.replace("http://", "")
            httpUrl = "ws://" + httpUrl.split(":")[0]+":8089/ws"
        }else if(httpUrl.indexOf("https://") === 0) {
            httpUrl = httpUrl.replace("https://", "")
            httpUrl = "wss://" + httpUrl.split(":")[0]+":8089/ws"
        }else{
            // 提示传入连接错误
        }
        return httpUrl
    }
}
export const CommonUtils = new commonUtils()