Commit f88228a5 authored by songrui's avatar songrui

im 收到新消息 修改

parent 1cfcbe8b
...@@ -176,14 +176,18 @@ export default { ...@@ -176,14 +176,18 @@ export default {
}, },
onmsg: (msg) => { onmsg: (msg) => {
console.log('收到新消息===========>', msg); console.log('收到新消息===========>', msg);
if (msg.from === this.targetId) {
this.msgs.push(msg) this.msgs.push(msg)
this.toBottom() this.toBottom()
}
}, },
onofflinemsgs: (obj) => { onofflinemsgs: (obj) => {
console.log('收到离线消息===========>', obj); console.log('收到离线消息===========>', obj);
if (obj.to === this.targetId) {
this.msgs.push(...obj.msgs) this.msgs.push(...obj.msgs)
this.toBottom() this.toBottom()
} }
}
}) })
}, },
// 发送信息 // 发送信息
......
...@@ -39,12 +39,12 @@ module.exports = defineConfig({ ...@@ -39,12 +39,12 @@ module.exports = defineConfig({
} }
}, },
'/chronic-resident': { '/chronic-resident': {
target: 'http://192.168.1.125:8903', // target: 'http://192.168.1.125:8903',
// target: 'https://beta-tumour.zmnyjk.com', target: 'https://beta-tumour.zmnyjk.com',
changOrigin: true, changOrigin: true,
pathRewrite: { pathRewrite: {
'^/chronic-resident': '/', // '^/chronic-resident': '/',
// '^/chronic-resident': '/chronic-resident' '^/chronic-resident': '/chronic-resident'
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment