1
lzhe
2024-10-06 31f08375ddf2b7d0937fd222f9df4d2a6b3d9115
1
已修改2个文件
10 ■■■■ 文件已修改
src/utils/tool.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/station-live.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/tool.js
@@ -2,7 +2,7 @@
 * @Descripttion: 工具集
 * @version: 1.2
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-06-17 18:21:44
 * @LastEditTime: 2024-10-06 23:09:59
 */
import CryptoJS from 'crypto-js';
@@ -15,8 +15,11 @@
var hostname = window.location.hostname; // 获取主机名
var port = window.location.port; // 获取端口号
var pathname = window.location.pathname; // 获取路径名
console.log(hostname,port,pathname)
if (process.env.NODE_ENV=='development') {
    var path = "120.46.212.231:84";
    //var path = "120.46.212.231:85";
    var path = hostname+":"+port;
} else {
    var path = hostname+":"+port;
}
src/views/mdc/station-live.vue
@@ -2,7 +2,7 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-03-26 10:28:33
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-10-06 22:46:49
 * @LastEditTime: 2024-10-06 23:03:58
 * @FilePath: /smart-web/src/views/master/person/main/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -657,6 +657,7 @@
                        if(this.$TOOL.socket.websocket == null) {  //没有建立先建立
                            this.$TOOL.socket.connectToWebSocket(this.$TOOL.cookie.get("TOKEN")); 
                        }
                        console.log(obj,222333)
                        this.$TOOL.socket.sendDataToWebSocket(obj);  //发送
                        this.$TOOL.socket.websocket.onmessage = function(event) {  
                            var JSONData = JSON.parse(res.data.dpConfig);