修改禅道已知问题

This commit is contained in:
qq787203167
2022-03-11 10:18:15 +08:00
parent 6a2726d2cc
commit 4f20d5b922
+4 -21
View File
@@ -45,7 +45,7 @@
export default { export default {
name: 'HeaderNotice', name: 'HeaderNotice',
components: { components: {
DynamicNotice, DynamicNotice
}, },
data() { data() {
return { return {
@@ -54,7 +54,7 @@
listCementByUser: '/sys/sysAnnouncementSend/getMessageUnreadList', listCementByUser: '/sys/sysAnnouncementSend/getMessageUnreadList',
editCementSend: '/sys/sysAnnouncementSend/editByAnntIdAndUserId', editCementSend: '/sys/sysAnnouncementSend/editByAnntIdAndUserId',
queryById: '/sys/annountCement/queryById', queryById: '/sys/annountCement/queryById',
readAllMsg:'sys/sysAnnouncementSend/read', readAllMsg: 'sys/sysAnnouncementSend/read'
}, },
hovered: false, hovered: false,
announcement1: [], announcement1: [],
@@ -86,17 +86,6 @@
this.websocketOnclose() this.websocketOnclose()
}, },
methods: { methods: {
timerFun() {
this.stopTimer = false
let myTimer = setInterval(() => {
// 停止定时器
if (this.stopTimer == true) {
clearInterval(myTimer)
return
}
this.loadData()
}, 6000)
},
loadData() { loadData() {
try { try {
// 获取系统消息 // 获取系统消息
@@ -158,16 +147,9 @@
this.reconnect() this.reconnect()
}, },
websocketOnmessage: function(e) { websocketOnmessage: function(e) {
console.log(e) console.log('-----接收消息-------', e)
console.log('-----接收消息-------', e.data)
var data = eval('(' + e.data + ')') //解析对象
if (data.cmd == 'topic') {
//系统通知 //系统通知
this.loadData() this.loadData()
} else if (data.cmd == 'user') {
//用户消息
this.loadData()
}
}, },
websocketOnclose: function(e) { websocketOnclose: function(e) {
console.log('connection closed (' + e + ')') console.log('connection closed (' + e + ')')
@@ -198,6 +180,7 @@
heartCheckFun() { heartCheckFun() {
var that = this var that = this
//心跳检测,每20s心跳一次 //心跳检测,每20s心跳一次
console.log(123)
that.heartCheck = { that.heartCheck = {
timeout: 20000, timeout: 20000,
timeoutObj: null, timeoutObj: null,