From 4ff482bbbff4e45bd8f3dcf78c32ebb383a30f62 Mon Sep 17 00:00:00 2001 From: hejin Date: Sun, 24 Aug 2025 01:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 +- .env.production | 3 +- src/api/index.js | 18 ++++ src/application/online.vue | 136 +++++++++++++++++++++++++++- src/application/product-details.vue | 8 +- src/assets/images/icon/send.png | Bin 0 -> 764 bytes src/layouts/default.vue | 19 +++- src/locale/en.json | 4 + src/locale/zh.json | 4 + src/pages.json | 2 +- src/stores/index.js | 95 ++++++++++++++++++- 11 files changed, 280 insertions(+), 12 deletions(-) create mode 100644 src/assets/images/icon/send.png diff --git a/.env.development b/.env.development index 89203d2..3ab5f6c 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,4 @@ NODE_ENV='development' VITE_APP_TITLE='开发环境' -VITE_APP_BASE_API='http://114.132.197.85:8099' \ No newline at end of file +VITE_APP_BASE_API='http://114.132.197.85:8099' +VITE_APP_SCOKET='ws://114.132.197.85:8099/ws/asset/' \ No newline at end of file diff --git a/.env.production b/.env.production index 27aae4a..4b8ace8 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,4 @@ NODE_ENV='production' VITE_APP_TITLE='生产环境' -VITE_APP_BASE_API='' \ No newline at end of file +VITE_APP_BASE_API='http://114.132.197.85:8099' +VITE_APP_SCOKET='ws://114.132.197.85:8099/ws/asset/' \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js index b1ededf..9fff114 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -93,4 +93,22 @@ export const appMaxCatgIdApi = (catgName) => { **/ export const articlePageApi = (params) => { return request.get('/web/newsPageList', {params}) +} + +/** + * @function 获取聊天窗口信息 + * @param {string} cusCode 设备唯一值 + * @param {string} prodId 产品ID +**/ +export const msgListApi = (data) => { + return request.post('/web/chatMain',data) +} + +/** + * @function 保存消息 + * @param {string} id + * @param {array} jsonArray 最新的消息列表 +**/ +export const saveMsg = (data) => { + return request.post('/web/saveMessage', data) } \ No newline at end of file diff --git a/src/application/online.vue b/src/application/online.vue index 6de0d05..3e26403 100644 --- a/src/application/online.vue +++ b/src/application/online.vue @@ -1,15 +1,143 @@ \ No newline at end of file diff --git a/src/application/product-details.vue b/src/application/product-details.vue index 2ecc567..9de8b8e 100644 --- a/src/application/product-details.vue +++ b/src/application/product-details.vue @@ -173,7 +173,7 @@ {{$t('common.sendInquiry')}} - + {{$t('common.chatNow')}} @@ -312,6 +312,12 @@ {id:121113123,title: 'SINOTRUK HOWO Tractor Truck Head',mainPic:'https://dianliang123.oss-cn-qingdao.aliyuncs.com/user/2025/07/09/55979a0deee24031a38e934c6b06ca20.jpg'} ]) + const goOnline = () => { + uni.navigateTo({ + url: `/application/online?prodId=${info.value.id}` + }) + } + onLoad((options) => { id.value = options.id getInfo() diff --git a/src/assets/images/icon/send.png b/src/assets/images/icon/send.png new file mode 100644 index 0000000000000000000000000000000000000000..e2732ef24afc71b0a14ac693bccf44789c93ac1c GIT binary patch literal 764 zcmVPx%wn;=mR5(wqluc|@RTRg6|2OmA5ET+rGlSI@Z6zdN;?l^bV}cUHf|$sLSW4f7 z4KXYTY%oMtCM0UyK|(u&C8HZcj085ubXqpB>q0Ow7>ysaZ;Bu32Hu^Sdt{~`Hf;$s za+l|x^Sl3h&i`KVgqNN$kN*!GO8UdB24q$QYpxrZ8%p|p#)?uKq9U@M#akNOek3qg zs=wlm0m+JjBJkooK;F!5J&4x~^$7NQad;Ilcd)+IXME@MwhFKgz`$eN6sj3E;ml7` zd487ScsA3+&gH=}@zr|2B&2`vs@lZ7`VfEgfl|&tF?SELW8iT{p9eD{qb$lKbcxMM5XJu&UQSz zEt0 - - +