diff --git a/ruoyi-ui/src/utils/auth.js b/ruoyi-ui/src/utils/auth.js index 234a0a7a..6258738c 100644 --- a/ruoyi-ui/src/utils/auth.js +++ b/ruoyi-ui/src/utils/auth.js @@ -1,6 +1,6 @@ import Cookies from 'js-cookie' -const TokenKey = 'DC-Token' +const TokenKey = 'DC-Pro-Token' export function getToken() { return Cookies.get(TokenKey) diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index c2b177e9..fd0206b9 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -701,7 +701,7 @@ export default { /************************************ 设备消息 **************************************/ /** 时间按钮选项 */ timeDimensionChange() { - if (this.messageMonitorTimeDimension === 'day') { + /*if (this.messageMonitorTimeDimension === 'day') { this.messageMonitorTimePick = this.getTodayTime() const params = { time: '1h', @@ -763,7 +763,7 @@ export default { this.getMessageMonitorData(params, 'received_message') this.getMessageMonitorData(params, 'sent_message') - } + }*/ }, /** 设备消息char初始化 */ diff --git a/ruoyi-ui/src/views/websocket.vue b/ruoyi-ui/src/views/websocket.vue index 3c7c4979..783d9c16 100644 --- a/ruoyi-ui/src/views/websocket.vue +++ b/ruoyi-ui/src/views/websocket.vue @@ -19,7 +19,8 @@ export default { websocket({ password, path, port, interval}) { // 建立 websocket 连接 this.socket.initialize({ - url: 'ws://' + location.hostname + ':' + port + path, + // url: 'ws://' + location.hostname + ':' + port + path, + url: 'wss://' + location.hostname + ':' + window.location.port + '/ws' || 80 + '/ws', password: password, tokenSN: this.token, heartRate: interval