msb_beta
ch 3 years ago
parent ea6628172b
commit b261a1ded9

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-04-25 14:39:19 * @Date: 2022-04-25 14:39:19
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-27 10:12:40 * @LastEditTime: 2022-04-28 14:43:16
* @Description: file content * @Description: file content
*/ */
import store from "../store"; import store from "../store";
@ -44,7 +44,6 @@ const sessionMsg = (ctx)=>{
if(!sessionListFlag){ if(!sessionListFlag){
return return
} }
// ctx.forEach(item => {
ctx.payload = JSON.parse(ctx.payload || {}); ctx.payload = JSON.parse(ctx.payload || {});
let historyData = store.state.sessionData; let historyData = store.state.sessionData;
const hisIndex = historyData.findIndex(i => i.id === ctx.sessionId); const hisIndex = historyData.findIndex(i => i.id === ctx.sessionId);
@ -69,7 +68,6 @@ const sessionMsg = (ctx)=>{
}]); }]);
} }
// });
} }
export let MsbWebSkt = null; 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(); resolve();
}) })
}) })

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-26 14:32:03 * @Date: 2022-03-26 14:32:03
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-26 17:52:30 * @LastEditTime: 2022-04-28 14:36:13
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -35,21 +35,19 @@ export default {
}, },
methods:{ methods:{
getHistoryMsg(){ getHistoryMsg(){
// MsbWebSkt.onOpen(()=>{ MsbWebSkt.send({
// MsbWebSkt.send({ data : JSON.stringify({
// data : JSON.stringify({ traceId : createUUID(),
// traceId : createUUID(), traceType : "2",
// traceType : "2", content: { sessionId : this.$Route.query.id}
// content: { sessionId : this.$Route.query.id} }),
// }), success(){
// success(){ console.log('suxx');
// console.log('suxx'); },
// }, fail(e){
// fail(e){ console.log('fxx',e);
// console.log('fxx',e); }
// } })
// })
// })
}, },
xx(){ xx(){
console.log(this.$store.state.sessionData); console.log(this.$store.state.sessionData);

Loading…
Cancel
Save