Commit f88228a5 authored by songrui's avatar songrui

im 收到新消息 修改

parent 1cfcbe8b
...@@ -176,13 +176,17 @@ export default { ...@@ -176,13 +176,17 @@ export default {
}, },
onmsg: (msg) => { onmsg: (msg) => {
console.log('收到新消息===========>', msg); console.log('收到新消息===========>', msg);
this.msgs.push(msg) if (msg.from === this.targetId) {
this.toBottom() this.msgs.push(msg)
this.toBottom()
}
}, },
onofflinemsgs: (obj) => { onofflinemsgs: (obj) => {
console.log('收到离线消息===========>', obj); console.log('收到离线消息===========>', obj);
this.msgs.push(...obj.msgs) if (obj.to === this.targetId) {
this.toBottom() this.msgs.push(...obj.msgs)
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