|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-05-04 17:48:12
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-05-27 10:56:40
|
|
|
|
|
* @LastEditTime: 2022-05-27 11:09:52
|
|
|
|
|
* @Description: file content
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
@ -49,7 +49,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import UiEmpty from "@/components/UiEmpty.vue";
|
|
|
|
|
import {FormatDate} from '@/plugins/utils'
|
|
|
|
|
import {FormatDate, CreatUuid} from '@/plugins/utils'
|
|
|
|
|
export default {
|
|
|
|
|
components: { UiEmpty },
|
|
|
|
|
data() {
|
|
|
|
@ -68,20 +68,24 @@ export default {
|
|
|
|
|
mounted() {
|
|
|
|
|
// console.log(`socketMsgData`, this.$store.state);
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.readMsg()
|
|
|
|
|
},2000)
|
|
|
|
|
this.readMsg();
|
|
|
|
|
},5000)
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 把当前会话消息置为已读
|
|
|
|
|
*/
|
|
|
|
|
async readMsg(){
|
|
|
|
|
this.Socket.setRead({
|
|
|
|
|
content: {
|
|
|
|
|
sessionId : this.msgData[0].sessionId
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
readMsg(){
|
|
|
|
|
this.Socket.send(JSON.stringify({
|
|
|
|
|
traceId : CreatUuid(),
|
|
|
|
|
traceType : "6",
|
|
|
|
|
content: {
|
|
|
|
|
sessionId : this.msgData[0].sessionId
|
|
|
|
|
}
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
this.$store.commit("setUnreadCount", 0);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|