From 7a9c19e4f31ea29b485d8fa41a77b8dcb7ba9dc7 Mon Sep 17 00:00:00 2001
From: geht <2947093423@qq.com>
Date: Tue, 21 Jul 2026 15:53:06 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0IM=E7=B3=BB=E7=BB=9F=E4=B8=8E?=
=?UTF-8?q?PC=E7=AB=AF=E4=B8=80=E8=87=B4=E7=9A=84WebSocket=E8=BF=9E?=
=?UTF-8?q?=E6=8E=A5=EF=BC=8C=E4=BC=98=E5=8C=96=E8=81=8A=E5=A4=A9=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=EF=BC=8C=E6=94=AF=E6=8C=81=E5=A4=9A=E7=AB=AF=E6=B6=88?=
=?UTF-8?q?=E6=81=AF=E5=90=8C=E6=AD=A5=EF=BC=8C=E6=9B=B4=E6=96=B0=E8=81=94?=
=?UTF-8?q?=E7=B3=BB=E4=BA=BA=E5=92=8C=E4=BC=9A=E8=AF=9D=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=A2=9E=E5=BC=BA=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E4=BD=93=E9=AA=8C=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
JeecgUniapp-master/src/common/socket.ts | 170 +++--
.../src/pages-message/chat/chat.vue | 602 ++++++------------
.../src/pages-message/chat/imEmojiData.json | 1 +
.../src/pages-message/contacts/contacts.vue | 51 +-
.../pages-message/personPage/personPage.vue | 6 +-
.../message/components/addressBookList.vue | 6 +
.../src/pages/message/components/chatList.vue | 338 +++-------
JeecgUniapp-master/src/service/im/chat.ts | 137 ++++
.../src/static/im-emoji/1f441-200d-1f5e8.png | Bin 0 -> 613 bytes
.../src/static/im-emoji/1f479.png | Bin 0 -> 1553 bytes
.../src/static/im-emoji/1f47a.png | Bin 0 -> 1110 bytes
.../src/static/im-emoji/1f47b.png | Bin 0 -> 816 bytes
.../src/static/im-emoji/1f47d.png | Bin 0 -> 809 bytes
.../src/static/im-emoji/1f47e.png | Bin 0 -> 156 bytes
.../src/static/im-emoji/1f47f.png | Bin 0 -> 750 bytes
.../src/static/im-emoji/1f480.png | Bin 0 -> 646 bytes
.../src/static/im-emoji/1f48b.png | Bin 0 -> 571 bytes
.../src/static/im-emoji/1f48c.png | Bin 0 -> 763 bytes
.../src/static/im-emoji/1f493.png | Bin 0 -> 734 bytes
.../src/static/im-emoji/1f494.png | Bin 0 -> 623 bytes
.../src/static/im-emoji/1f495.png | Bin 0 -> 558 bytes
.../src/static/im-emoji/1f496.png | Bin 0 -> 856 bytes
.../src/static/im-emoji/1f497.png | Bin 0 -> 998 bytes
.../src/static/im-emoji/1f498.png | Bin 0 -> 945 bytes
.../src/static/im-emoji/1f499.png | Bin 0 -> 498 bytes
.../src/static/im-emoji/1f49a.png | Bin 0 -> 499 bytes
.../src/static/im-emoji/1f49b.png | Bin 0 -> 497 bytes
.../src/static/im-emoji/1f49c.png | Bin 0 -> 498 bytes
.../src/static/im-emoji/1f49d.png | Bin 0 -> 881 bytes
.../src/static/im-emoji/1f49e.png | Bin 0 -> 889 bytes
.../src/static/im-emoji/1f49f.png | Bin 0 -> 521 bytes
.../src/static/im-emoji/1f4a2.png | Bin 0 -> 725 bytes
.../src/static/im-emoji/1f4a4.png | Bin 0 -> 390 bytes
.../src/static/im-emoji/1f4a5.png | Bin 0 -> 1030 bytes
.../src/static/im-emoji/1f4a6.png | Bin 0 -> 617 bytes
.../src/static/im-emoji/1f4a8.png | Bin 0 -> 533 bytes
.../src/static/im-emoji/1f4a9.png | Bin 0 -> 858 bytes
.../src/static/im-emoji/1f4ab.png | Bin 0 -> 866 bytes
.../src/static/im-emoji/1f4ac.png | Bin 0 -> 496 bytes
.../src/static/im-emoji/1f4ad.png | Bin 0 -> 477 bytes
.../src/static/im-emoji/1f4af.png | Bin 0 -> 864 bytes
.../src/static/im-emoji/1f573.png | Bin 0 -> 561 bytes
.../src/static/im-emoji/1f5a4.png | Bin 0 -> 498 bytes
.../src/static/im-emoji/1f5e8.png | Bin 0 -> 450 bytes
.../src/static/im-emoji/1f5ef.png | Bin 0 -> 1090 bytes
.../src/static/im-emoji/1f600.png | Bin 0 -> 806 bytes
.../src/static/im-emoji/1f601.png | Bin 0 -> 866 bytes
.../src/static/im-emoji/1f602.png | Bin 0 -> 1095 bytes
.../src/static/im-emoji/1f603.png | Bin 0 -> 825 bytes
.../src/static/im-emoji/1f604.png | Bin 0 -> 809 bytes
.../src/static/im-emoji/1f605.png | Bin 0 -> 998 bytes
.../src/static/im-emoji/1f606.png | Bin 0 -> 913 bytes
.../src/static/im-emoji/1f607.png | Bin 0 -> 1112 bytes
.../src/static/im-emoji/1f608.png | Bin 0 -> 784 bytes
.../src/static/im-emoji/1f609.png | Bin 0 -> 760 bytes
.../src/static/im-emoji/1f60a.png | Bin 0 -> 796 bytes
.../src/static/im-emoji/1f60b.png | Bin 0 -> 940 bytes
.../src/static/im-emoji/1f60c.png | Bin 0 -> 723 bytes
.../src/static/im-emoji/1f60d.png | Bin 0 -> 978 bytes
.../src/static/im-emoji/1f60e.png | Bin 0 -> 871 bytes
.../src/static/im-emoji/1f60f.png | Bin 0 -> 702 bytes
.../src/static/im-emoji/1f610.png | Bin 0 -> 509 bytes
.../src/static/im-emoji/1f611.png | Bin 0 -> 447 bytes
.../src/static/im-emoji/1f612.png | Bin 0 -> 695 bytes
.../src/static/im-emoji/1f613.png | Bin 0 -> 807 bytes
.../src/static/im-emoji/1f614.png | Bin 0 -> 683 bytes
.../src/static/im-emoji/1f615.png | Bin 0 -> 592 bytes
.../src/static/im-emoji/1f616.png | Bin 0 -> 890 bytes
.../src/static/im-emoji/1f617.png | Bin 0 -> 607 bytes
.../src/static/im-emoji/1f618.png | Bin 0 -> 1030 bytes
.../src/static/im-emoji/1f619.png | Bin 0 -> 651 bytes
.../src/static/im-emoji/1f61a.png | Bin 0 -> 910 bytes
.../src/static/im-emoji/1f61b.png | Bin 0 -> 846 bytes
.../src/static/im-emoji/1f61c.png | Bin 0 -> 1003 bytes
.../src/static/im-emoji/1f61d.png | Bin 0 -> 972 bytes
.../src/static/im-emoji/1f61e.png | Bin 0 -> 648 bytes
.../src/static/im-emoji/1f61f.png | Bin 0 -> 720 bytes
.../src/static/im-emoji/1f620.png | Bin 0 -> 683 bytes
.../src/static/im-emoji/1f621.png | Bin 0 -> 683 bytes
.../src/static/im-emoji/1f622.png | Bin 0 -> 904 bytes
.../src/static/im-emoji/1f623.png | Bin 0 -> 854 bytes
.../src/static/im-emoji/1f624.png | Bin 0 -> 1168 bytes
.../src/static/im-emoji/1f625.png | Bin 0 -> 921 bytes
.../src/static/im-emoji/1f626.png | Bin 0 -> 597 bytes
.../src/static/im-emoji/1f627.png | Bin 0 -> 716 bytes
.../src/static/im-emoji/1f628.png | Bin 0 -> 1040 bytes
.../src/static/im-emoji/1f629.png | Bin 0 -> 956 bytes
.../src/static/im-emoji/1f62a.png | Bin 0 -> 921 bytes
.../src/static/im-emoji/1f62b.png | Bin 0 -> 941 bytes
.../src/static/im-emoji/1f62c.png | Bin 0 -> 640 bytes
.../src/static/im-emoji/1f62d.png | Bin 0 -> 980 bytes
.../src/static/im-emoji/1f62e-200d-1f4a8.png | Bin 0 -> 1034 bytes
.../src/static/im-emoji/1f62e.png | Bin 0 -> 591 bytes
.../src/static/im-emoji/1f62f.png | Bin 0 -> 693 bytes
.../src/static/im-emoji/1f630.png | Bin 0 -> 1095 bytes
.../src/static/im-emoji/1f631.png | Bin 0 -> 1180 bytes
.../src/static/im-emoji/1f632.png | Bin 0 -> 816 bytes
.../src/static/im-emoji/1f633.png | Bin 0 -> 974 bytes
.../src/static/im-emoji/1f634.png | Bin 0 -> 1061 bytes
.../src/static/im-emoji/1f635-200d-1f4ab.png | Bin 0 -> 959 bytes
.../src/static/im-emoji/1f635.png | Bin 0 -> 742 bytes
.../src/static/im-emoji/1f636.png | Bin 0 -> 494 bytes
.../src/static/im-emoji/1f637.png | Bin 0 -> 837 bytes
.../src/static/im-emoji/1f638.png | Bin 0 -> 1377 bytes
.../src/static/im-emoji/1f639.png | Bin 0 -> 1394 bytes
.../src/static/im-emoji/1f63a.png | Bin 0 -> 1271 bytes
.../src/static/im-emoji/1f63b.png | Bin 0 -> 1315 bytes
.../src/static/im-emoji/1f63c.png | Bin 0 -> 1251 bytes
.../src/static/im-emoji/1f63d.png | Bin 0 -> 1243 bytes
.../src/static/im-emoji/1f63e.png | Bin 0 -> 1260 bytes
.../src/static/im-emoji/1f63f.png | Bin 0 -> 1315 bytes
.../src/static/im-emoji/1f640.png | Bin 0 -> 1388 bytes
.../src/static/im-emoji/1f641.png | Bin 0 -> 609 bytes
.../src/static/im-emoji/1f642.png | Bin 0 -> 620 bytes
.../src/static/im-emoji/1f643.png | Bin 0 -> 646 bytes
.../src/static/im-emoji/1f644.png | Bin 0 -> 772 bytes
.../src/static/im-emoji/1f648.png | Bin 0 -> 1457 bytes
.../src/static/im-emoji/1f649.png | Bin 0 -> 1336 bytes
.../src/static/im-emoji/1f64a.png | Bin 0 -> 1297 bytes
.../src/static/im-emoji/1f90d.png | Bin 0 -> 498 bytes
.../src/static/im-emoji/1f90e.png | Bin 0 -> 499 bytes
.../src/static/im-emoji/1f910.png | Bin 0 -> 883 bytes
.../src/static/im-emoji/1f911.png | Bin 0 -> 1163 bytes
.../src/static/im-emoji/1f912.png | Bin 0 -> 1075 bytes
.../src/static/im-emoji/1f913.png | Bin 0 -> 1201 bytes
.../src/static/im-emoji/1f914.png | Bin 0 -> 1028 bytes
.../src/static/im-emoji/1f915.png | Bin 0 -> 965 bytes
.../src/static/im-emoji/1f916.png | Bin 0 -> 797 bytes
.../src/static/im-emoji/1f917.png | Bin 0 -> 1262 bytes
.../src/static/im-emoji/1f920.png | Bin 0 -> 1093 bytes
.../src/static/im-emoji/1f921.png | Bin 0 -> 1033 bytes
.../src/static/im-emoji/1f922.png | Bin 0 -> 880 bytes
.../src/static/im-emoji/1f923.png | Bin 0 -> 1294 bytes
.../src/static/im-emoji/1f924.png | Bin 0 -> 811 bytes
.../src/static/im-emoji/1f925.png | Bin 0 -> 691 bytes
.../src/static/im-emoji/1f927.png | Bin 0 -> 1146 bytes
.../src/static/im-emoji/1f928.png | Bin 0 -> 727 bytes
.../src/static/im-emoji/1f929.png | Bin 0 -> 1175 bytes
.../src/static/im-emoji/1f92a.png | Bin 0 -> 1175 bytes
.../src/static/im-emoji/1f92b.png | Bin 0 -> 1137 bytes
.../src/static/im-emoji/1f92c.png | Bin 0 -> 1068 bytes
.../src/static/im-emoji/1f92d.png | Bin 0 -> 940 bytes
.../src/static/im-emoji/1f92e.png | Bin 0 -> 1143 bytes
.../src/static/im-emoji/1f92f.png | Bin 0 -> 1205 bytes
.../src/static/im-emoji/1f970.png | Bin 0 -> 1148 bytes
.../src/static/im-emoji/1f971.png | Bin 0 -> 1088 bytes
.../src/static/im-emoji/1f972.png | Bin 0 -> 777 bytes
.../src/static/im-emoji/1f973.png | Bin 0 -> 1260 bytes
.../src/static/im-emoji/1f974.png | Bin 0 -> 972 bytes
.../src/static/im-emoji/1f975.png | Bin 0 -> 1145 bytes
.../src/static/im-emoji/1f976.png | Bin 0 -> 1324 bytes
.../src/static/im-emoji/1f978.png | Bin 0 -> 1327 bytes
.../src/static/im-emoji/1f979.png | Bin 0 -> 1126 bytes
.../src/static/im-emoji/1f97a.png | Bin 0 -> 1076 bytes
.../src/static/im-emoji/1f9d0.png | Bin 0 -> 1105 bytes
.../src/static/im-emoji/1f9e1.png | Bin 0 -> 499 bytes
.../src/static/im-emoji/1fae0.png | Bin 0 -> 707 bytes
.../src/static/im-emoji/1fae1.png | Bin 0 -> 1039 bytes
.../src/static/im-emoji/1fae2.png | Bin 0 -> 924 bytes
.../src/static/im-emoji/1fae3.png | Bin 0 -> 1326 bytes
.../src/static/im-emoji/1fae4.png | Bin 0 -> 600 bytes
.../src/static/im-emoji/1fae5.png | Bin 0 -> 1000 bytes
.../src/static/im-emoji/2620.png | Bin 0 -> 936 bytes
.../src/static/im-emoji/2639.png | Bin 0 -> 643 bytes
.../src/static/im-emoji/263a.png | Bin 0 -> 836 bytes
.../src/static/im-emoji/2763.png | Bin 0 -> 473 bytes
.../src/static/im-emoji/2764.png | Bin 0 -> 498 bytes
.../jeecg-system-biz/docs/代码修改日志 | 5 +
.../im/service/impl/SysImChatServiceImpl.java | 6 +-
jeecgboot-vue3/src/views/system/im/ImChat.vue | 50 +-
jeecgboot-vue3/src/views/system/im/imCache.ts | 36 +-
171 files changed, 661 insertions(+), 747 deletions(-)
create mode 100644 JeecgUniapp-master/src/pages-message/chat/imEmojiData.json
create mode 100644 JeecgUniapp-master/src/service/im/chat.ts
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f441-200d-1f5e8.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f479.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f47a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f47b.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f47d.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f47e.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f47f.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f480.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f48b.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f48c.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f493.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f494.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f495.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f496.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f497.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f498.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f499.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f49a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f49b.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f49c.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f49d.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f49e.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f49f.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4a2.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4a4.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4a5.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4a6.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4a8.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4a9.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4ab.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4ac.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4ad.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f4af.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f573.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f5a4.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f5e8.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f5ef.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f600.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f601.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f602.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f603.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f604.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f605.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f606.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f607.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f608.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f609.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f60a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f60b.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f60c.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f60d.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f60e.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f60f.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f610.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f611.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f612.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f613.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f614.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f615.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f616.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f617.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f618.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f619.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f61a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f61b.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f61c.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f61d.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f61e.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f61f.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f620.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f621.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f622.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f623.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f624.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f625.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f626.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f627.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f628.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f629.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f62a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f62b.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f62c.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f62d.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f62e-200d-1f4a8.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f62e.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f62f.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f630.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f631.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f632.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f633.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f634.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f635-200d-1f4ab.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f635.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f636.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f637.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f638.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f639.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f63a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f63b.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f63c.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f63d.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f63e.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f63f.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f640.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f641.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f642.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f643.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f644.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f648.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f649.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f64a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f90d.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f90e.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f910.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f911.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f912.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f913.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f914.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f915.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f916.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f917.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f920.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f921.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f922.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f923.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f924.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f925.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f927.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f928.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f929.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f92a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f92b.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f92c.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f92d.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f92e.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f92f.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f970.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f971.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f972.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f973.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f974.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f975.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f976.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f978.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f979.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f97a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f9d0.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1f9e1.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1fae0.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1fae1.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1fae2.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1fae3.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1fae4.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/1fae5.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/2620.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/2639.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/263a.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/2763.png
create mode 100644 JeecgUniapp-master/src/static/im-emoji/2764.png
diff --git a/JeecgUniapp-master/src/common/socket.ts b/JeecgUniapp-master/src/common/socket.ts
index f1f6fd73..7e0ad775 100644
--- a/JeecgUniapp-master/src/common/socket.ts
+++ b/JeecgUniapp-master/src/common/socket.ts
@@ -1,5 +1,5 @@
// @ts-nocheck
-import { randomString } from './uitls'
+import md5 from 'md5'
import { useUserStore } from '@/store/user'
const baseUrl = import.meta.env.VITE_SERVER_BASEURL
@@ -8,66 +8,81 @@ class socket {
constructor() {
this.socketUrl = baseUrl
this.socketStart = false
- this.socketType = ''
+ this.socketType = 'websocket'
+ this._heartbeatTimer = null
this.monitorSocketError()
this.monitorSocketClose()
this.socketReceive()
}
+
+ //update-begin---author:xsl ---date:2026-07-20 for:【APP对接真实IM】系统 WebSocket 地址与 PC 一致-----------
+ /** 构建系统 WebSocket 地址:/websocket/{userId}_{md5(token)} */
+ buildSystemWebSocketUrl() {
+ const userStore = useUserStore()
+ const userId = userStore.userInfo.userid
+ const token = userStore.userInfo.token || ''
+ if (!userId || !this.socketUrl) {
+ return ''
+ }
+ const wsClientId = md5(token)
+ const base = this.socketUrl.replace('https://', 'wss://').replace('http://', 'ws://').replace(/\/$/, '')
+ return `${base}/websocket/${userId}_${wsClientId}`
+ }
+ //update-end---author:xsl ---date:2026-07-20 for:【APP对接真实IM】系统 WebSocket 地址与 PC 一致-----------
+
init(socket_type, callback?) {
const userStore = useUserStore()
- if (baseUrl) {
- if (this.socketStart) {
- console.log('webSocket已经启动了')
- } else {
- this.socketType = socket_type
- let url =
- this.socketUrl.replace('https://', 'wss://').replace('http://', 'ws://') +
- '/' +
- socket_type +
- '/' +
- userStore.userInfo.userid +
- '_app'
- if (socket_type == 'eoaNewChatSocket') {
- let randomMessageId = randomString(6)
- url =
- this.socketUrl.replace('https://', 'wss://').replace('http://', 'ws://') +
- '/eoaNewChatSocket/' +
- userStore.userInfo.userid +
- '/' +
- randomMessageId
- }
- console.log('启动this.socketUrl连接地址:', url)
- // update-begin-author:taoyan date:20220422 for:v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
-
- let token = userStore.userInfo.token
- uni.connectSocket({
- url: url,
- method: 'GET',
- protocols: [token],
- })
- // update-end-author:taoyan date:20220422 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
- uni.onSocketOpen((res) => {
- this.socketStart = true
- callback && callback()
- console.log('WebSocket连接已打开!')
- })
- /* setTimeout(() => {
- this.getHeartbeat();
- }, 5000); */
- }
- } else {
+ if (!baseUrl) {
console.log('config/baseUrl socketUrl为空')
+ return
}
+ if (this.socketStart) {
+ console.log('webSocket已经启动了')
+ callback && callback()
+ return
+ }
+ this.socketType = socket_type || 'websocket'
+ //update-begin---author:xsl ---date:2026-07-20 for:【APP对接真实IM】连接原生 /websocket-----------
+ let url = this.buildSystemWebSocketUrl()
+ if (this.socketType !== 'websocket') {
+ // 兼容旧路径(如历史业务仍传入自定义 type)
+ url =
+ this.socketUrl.replace('https://', 'wss://').replace('http://', 'ws://') +
+ '/' +
+ this.socketType +
+ '/' +
+ userStore.userInfo.userid +
+ '_app'
+ }
+ //update-end---author:xsl ---date:2026-07-20 for:【APP对接真实IM】连接原生 /websocket-----------
+ if (!url) {
+ console.log('WebSocket url 为空,跳过连接')
+ return
+ }
+ console.log('启动this.socketUrl连接地址:', url)
+ const token = userStore.userInfo.token
+ uni.connectSocket({
+ url: url,
+ method: 'GET',
+ protocols: [token],
+ })
+ uni.onSocketOpen((res) => {
+ this.socketStart = true
+ callback && callback()
+ console.log('WebSocket连接已打开!')
+ this.startHeartbeat()
+ })
}
+
// Socket给服务器发送消息
send(data, callback) {
const userStore = useUserStore()
- if (userStore.userInfo.userid) {
+ if (userStore.userInfo.userid && typeof data === 'object' && data !== null) {
data.userUid = userStore.userInfo.userid
}
- console.log(data)
+ const payload = typeof data === 'string' ? data : JSON.stringify(data)
uni.sendSocketMessage({
- data: JSON.stringify(data),
+ data: payload,
success: () => {
callback && callback(true)
},
@@ -76,61 +91,76 @@ class socket {
},
})
}
+
acceptMessage(msg) {
console.log(msg)
}
+
// Socket接收服务器发送过来的消息
socketReceive() {
uni.onSocketMessage((res) => {
- console.log('APP:--》收到服务器内容:')
- let data = JSON.parse(res.data)
- // console.log('收到服务器内容:', data);
+ //update-begin---author:xsl ---date:2026-07-20 for:【APP对接真实IM】忽略心跳并解析 JSON-----------
+ if (res.data === 'ping' || res.data === 'pong') {
+ return
+ }
+ let data
+ try {
+ data = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
+ } catch (e) {
+ console.log('WebSocket 非 JSON 消息:', res.data)
+ return
+ }
+ //update-end---author:xsl ---date:2026-07-20 for:【APP对接真实IM】忽略心跳并解析 JSON-----------
this.acceptMessage && this.acceptMessage(data)
})
}
+
// 关闭Socket
closeSocket() {
+ this.stopHeartbeat()
uni.closeSocket()
this.socketStart = false
}
+
// 监听Socket关闭
monitorSocketClose() {
uni.onSocketClose((res) => {
console.log('WebSocket 已关闭!')
this.socketStart = false
+ this.stopHeartbeat()
setTimeout(() => {
this.init(this.socketType)
}, 3000)
})
}
+
// 监听Socket错误
monitorSocketError() {
- uni.onSocketError(function (res) {
+ uni.onSocketError((res) => {
this.socketStart = false
console.log('WebSocket连接打开失败,请检查!')
})
}
- // 心跳
- getHeartbeat() {
- const userStore = useUserStore()
- this.send(
- {
- type: '心跳',
- userUid: userStore.userInfo.userid,
- },
- (val) => {
- setTimeout(() => {
- if (val) {
- // this.getHeartbeat();
- } else {
- if (!this.socketStart) {
- // this.init();
- }
- }
- }, 10000)
- },
- )
+
+ //update-begin---author:xsl ---date:2026-07-20 for:【APP对接真实IM】心跳 ping-----------
+ startHeartbeat() {
+ this.stopHeartbeat()
+ this._heartbeatTimer = setInterval(() => {
+ if (!this.socketStart) {
+ return
+ }
+ this.send('ping')
+ }, 55000)
}
+
+ stopHeartbeat() {
+ if (this._heartbeatTimer) {
+ clearInterval(this._heartbeatTimer)
+ this._heartbeatTimer = null
+ }
+ }
+ //update-end---author:xsl ---date:2026-07-20 for:【APP对接真实IM】心跳 ping-----------
}
+
const mySocket = new socket()
export default mySocket
diff --git a/JeecgUniapp-master/src/pages-message/chat/chat.vue b/JeecgUniapp-master/src/pages-message/chat/chat.vue
index e9812681..1327f7fa 100644
--- a/JeecgUniapp-master/src/pages-message/chat/chat.vue
+++ b/JeecgUniapp-master/src/pages-message/chat/chat.vue
@@ -4,9 +4,9 @@
style: {
navigationBarTitleText: '聊天',
navigationStyle: 'custom',
- disableScroll: true, // 微信禁止页面滚动
+ disableScroll: true,
'app-plus': {
- bounce: 'none', // 禁用 iOS 弹性效果
+ bounce: 'none',
},
},
}
@@ -23,14 +23,14 @@
>
-
+
-
+
@@ -38,354 +38,230 @@