msb_beta
ch 3 years ago
parent ea6628172b
commit b261a1ded9

@ -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();
})
})

@ -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
-->
<template>
@ -35,21 +35,19 @@ export default {
},
methods:{
getHistoryMsg(){
// MsbWebSkt.onOpen(()=>{
// MsbWebSkt.send({
// data : JSON.stringify({
// traceId : createUUID(),
// traceType : "2",
// content: { sessionId : this.$Route.query.id}
// }),
// success(){
// console.log('suxx');
// },
// fail(e){
// console.log('fxx',e);
// }
// })
// })
MsbWebSkt.send({
data : JSON.stringify({
traceId : createUUID(),
traceType : "2",
content: { sessionId : this.$Route.query.id}
}),
success(){
console.log('suxx');
},
fail(e){
console.log('fxx',e);
}
})
},
xx(){
console.log(this.$store.state.sessionData);

Loading…
Cancel
Save