diff --git a/common/utils/websocket.js b/common/utils/websocket.js index 3a2ad0b..9f1a586 100644 --- a/common/utils/websocket.js +++ b/common/utils/websocket.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-04-25 14:39:19 * @LastEditors: ch - * @LastEditTime: 2022-04-27 10:12:40 + * @LastEditTime: 2022-04-28 14:43:16 * @Description: file content */ import store from "../store"; @@ -44,7 +44,6 @@ const sessionMsg = (ctx)=>{ if(!sessionListFlag){ return } -// ctx.forEach(item => { ctx.payload = JSON.parse(ctx.payload || {}); let historyData = store.state.sessionData; const hisIndex = historyData.findIndex(i => i.id === ctx.sessionId); @@ -69,7 +68,6 @@ const sessionMsg = (ctx)=>{ }]); } -// }); } export let MsbWebSkt = null; @@ -105,6 +103,16 @@ export const MsbWebSktInit = () => { } } }) + setInterval(()=>{ + MsbWebSkt.send({ + data : JSON.stringify({ + traceId : createUUID(), + traceType : "0", + content: { text : "ping"} + }) + }) + + }, 5000); resolve(); }) }) diff --git a/pages/account/message/list.vue b/pages/account/message/list.vue index e822f1e..d9f5af1 100644 --- a/pages/account/message/list.vue +++ b/pages/account/message/list.vue @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-03-26 14:32:03 * @LastEditors: ch - * @LastEditTime: 2022-04-26 17:52:30 + * @LastEditTime: 2022-04-28 14:36:13 * @Description: file content -->