This commit is contained in:
aqu415
2022-02-24 21:44:55 +08:00
parent b21f3cec38
commit 07651ad084
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -45,7 +45,7 @@
// show
let data = resp.data.snapshot_data
me.coop_mind_id = id
me.coop_mind_log_id = resp.data.snapshot_log_id
me.coop_mind_log_id = resp.data.log_id
me.show_mind(resp.data.coop_mind_name, JSON.parse(data))
})
},
+6 -2
View File
@@ -65,8 +65,6 @@
this.coop_mind_id = _jm.options.coop_mind_id
this.coop_mind_log_id = _jm.options.coop_mind_log_id
this.coop_mind_log_last_id = _jm.options.coop_mind_log_id
console.log(this.coop_mind_log_id)
},
// 初始化websocket
_init_ws: function () {
@@ -131,6 +129,12 @@
_handle_jsmind_with_ws_message: function (message) {
const msg_json = JSON.parse(message)
const client_id = msg_json.client_id
const log_id = msg_json.log_id
if (log_id > this.coop_mind_log_id) {
this.coop_mind_log_id = log_id
}
// 回放
if (client_id === this.client_id) {
console.log('self msg')
} else {