From 3a561a504e2f1d2c1bdc069d55d9df96c6ba0559 Mon Sep 17 00:00:00 2001 From: PQZ Date: Wed, 23 Jul 2025 09:50:10 +0800 Subject: [PATCH] 1 --- env.js | 2 +- pages/products/_id.vue | 1 - pages/products/chatForm.vue | 32 +++----------------------------- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/env.js b/env.js index 58fc6dd..16c7a8d 100644 --- a/env.js +++ b/env.js @@ -9,7 +9,7 @@ module.exports = { dev: { MODE: 'dev', // VUE_APP_API_URL: 'http://122.51.230.86:8099/', - VUE_APP_API_URL: 'http://192.168.1.17:8099/', + VUE_APP_API_URL: 'http://192.168.1.4:8099/', VUE_APP_WEBSOCKET: 'ws://localhost:8099/ws/asset/' }, // 生产环境 接口请求地址 (http)或(https)://www.a.com(换成你的域名)/api 非独立部署默认为空 diff --git a/pages/products/_id.vue b/pages/products/_id.vue index d82cb21..97b55a9 100644 --- a/pages/products/_id.vue +++ b/pages/products/_id.vue @@ -243,7 +243,6 @@ export default { /**打开聊天窗口,并建立连接*/ chat(){ this.$refs.chatFrom.show() - } diff --git a/pages/products/chatForm.vue b/pages/products/chatForm.vue index 9e5e81d..4e8222e 100644 --- a/pages/products/chatForm.vue +++ b/pages/products/chatForm.vue @@ -6,37 +6,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - + - + {{ item.content }} @@ -87,8 +64,6 @@ export default { title: null, //消息 message: [], - //客户端 - name: null, //发送消息内容 text: null, //聊天信息 @@ -128,7 +103,6 @@ export default { Fingerprint2.get((components) => { const values = components.map((component) => component.value); const fingerprintHash = Fingerprint2.x64hash128(values.join(''), 31); - this.name = fingerprintHash const data = { cusCode: fingerprintHash, tenantId: 'main', @@ -162,7 +136,7 @@ export default { /**发送消息*/ sendToServer() { - this.$store.dispatch('modules/websocket/websocket_send',this.name + "," + this.text); + this.$store.dispatch('modules/websocket/websocket_send',"customer," + this.text); this.message=this.$store.state.modules.websocket.messages; this.text='' }