From 651d20b9093d0b05cc4102c893a8aff6a8e6d215 Mon Sep 17 00:00:00 2001 From: bobobobo <1055026847@qq.com> Date: Mon, 19 Jan 2026 23:30:08 +0800 Subject: [PATCH] =?UTF-8?q?UI=E4=BC=98=E5=8C=96=EF=BC=8C=E7=BA=A2=E5=8C=85?= =?UTF-8?q?=E9=A2=86=E5=8F=96=E5=90=8E=E7=BC=BA=E5=B0=91=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=EF=BC=8C=E5=90=8D=E7=A7=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- TUIKit/assets/icon/add-frien-icon.svg | 11 + TUIKit/assets/icon/add-friend.svg | 1 + TUIKit/assets/icon/blacklist-icon.svg | 6 + TUIKit/assets/icon/friend-request-icon.svg | 10 + TUIKit/assets/icon/my-group-chat.svg | 9 + .../components/TUIChat/chat-header/index.vue | 7 +- .../message-input-toolbar/style/uni.scss | 2 +- .../toolbar-item-container/style/index.scss | 20 +- .../TUIChat/message-input/index.vue | 2 +- .../message-input/message-input-editor.vue | 565 +++++++------- .../components/TUIChat/message-list/index.vue | 88 ++- .../message-elements/message-bubble.vue | 730 +++++++++--------- .../TUIChat/message-list/style/index.scss | 8 + .../components/TUIChat/utils/sendMessage.ts | 7 +- .../TUIContact/contact-info/index.vue | 615 ++++++++------- .../contact-list/components/FriendList.vue | 50 +- .../contact-list/contact-list-item/index.vue | 2 +- .../TUIContact/contact-list/index.vue | 82 +- .../TUIContact/contact-search/index.vue | 286 +++---- TUIKit/components/TUIContact/index.vue | 10 +- .../conversation-list/index.vue | 8 + .../TUIGroup/create-group/index.vue | 11 +- TUIKit/components/TUISearch/index.vue | 310 ++++---- .../TUISearch/search-input/index.vue | 304 ++++---- TUIKit/components/TUISearch/style/web.scss | 4 +- TUIKit/components/common/Avatar/index.vue | 175 ++--- TUIKit/components/common/Navigation/index.vue | 142 ++-- TUIKit/components/common/Transfer/index.vue | 388 +++++----- composables/useAuthUser.js | 3 +- manifest.json | 2 +- pages.json | 8 +- pages/discover/punch.vue | 27 +- pages/discover/ranking-list.vue | 5 +- pages/my-index/my-index.vue | 5 +- pages/my-index/wallet/index.vue | 5 +- pages/my-index/withdraw.vue | 11 +- pages/red-packet/details.vue | 63 +- static/images/best.svg | 1 + stores/user.js | 14 + utils/index.js | 17 + 41 files changed, 2189 insertions(+), 1827 deletions(-) create mode 100644 TUIKit/assets/icon/add-frien-icon.svg create mode 100644 TUIKit/assets/icon/add-friend.svg create mode 100644 TUIKit/assets/icon/blacklist-icon.svg create mode 100644 TUIKit/assets/icon/friend-request-icon.svg create mode 100644 TUIKit/assets/icon/my-group-chat.svg create mode 100644 static/images/best.svg diff --git a/.env b/.env index ce0e40e..0bd77d6 100644 --- a/.env +++ b/.env @@ -9,4 +9,4 @@ VITE_CHANNEL_ID = "7b81ec142eca42baa045820793b821bb" VITE_GROUP_ID = "793db3a29c7846e198d71a1100d9d67b" #文档地址 -VITE_DOC_URL = "http://f69dbab6.natappfree.cc" \ No newline at end of file +VITE_DOC_URL = "http://b3967d34.natappfree.cc" \ No newline at end of file diff --git a/TUIKit/assets/icon/add-frien-icon.svg b/TUIKit/assets/icon/add-frien-icon.svg new file mode 100644 index 0000000..766d566 --- /dev/null +++ b/TUIKit/assets/icon/add-frien-icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/TUIKit/assets/icon/add-friend.svg b/TUIKit/assets/icon/add-friend.svg new file mode 100644 index 0000000..fb8749e --- /dev/null +++ b/TUIKit/assets/icon/add-friend.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/TUIKit/assets/icon/blacklist-icon.svg b/TUIKit/assets/icon/blacklist-icon.svg new file mode 100644 index 0000000..83c39df --- /dev/null +++ b/TUIKit/assets/icon/blacklist-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/TUIKit/assets/icon/friend-request-icon.svg b/TUIKit/assets/icon/friend-request-icon.svg new file mode 100644 index 0000000..38aad03 --- /dev/null +++ b/TUIKit/assets/icon/friend-request-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/TUIKit/assets/icon/my-group-chat.svg b/TUIKit/assets/icon/my-group-chat.svg new file mode 100644 index 0000000..048a0d6 --- /dev/null +++ b/TUIKit/assets/icon/my-group-chat.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/TUIKit/components/TUIChat/chat-header/index.vue b/TUIKit/components/TUIChat/chat-header/index.vue index 63fcc95..f022412 100644 --- a/TUIKit/components/TUIChat/chat-header/index.vue +++ b/TUIKit/components/TUIChat/chat-header/index.vue @@ -103,4 +103,9 @@ } } - + diff --git a/TUIKit/components/TUIChat/message-input-toolbar/style/uni.scss b/TUIKit/components/TUIChat/message-input-toolbar/style/uni.scss index bef466a..4c6f1f8 100644 --- a/TUIKit/components/TUIChat/message-input-toolbar/style/uni.scss +++ b/TUIKit/components/TUIChat/message-input-toolbar/style/uni.scss @@ -40,7 +40,7 @@ } .message-input-toolbar-uni { - background-color: #ebf0f6; + background-color: #ffffff; flex-direction: column; z-index: 100; diff --git a/TUIKit/components/TUIChat/message-input-toolbar/toolbar-item-container/style/index.scss b/TUIKit/components/TUIChat/message-input-toolbar/toolbar-item-container/style/index.scss index 92b8dfc..8d79d0a 100644 --- a/TUIKit/components/TUIChat/message-input-toolbar/toolbar-item-container/style/index.scss +++ b/TUIKit/components/TUIChat/message-input-toolbar/toolbar-item-container/style/index.scss @@ -1,5 +1,15 @@ -@import "../../../../../assets/styles/common"; -@import "./color"; -@import "./web"; -@import "./h5"; -@import "./uni"; +@import '../../../../../assets/styles/common'; +@import './color'; +@import './web'; +@import './h5'; +@import './uni'; + +.toolbar-item-container-icon { + background: #f4f4f4; +} + +.toolbar-item-container-uni-title { + font-weight: 500; + font-size: 24rpx; + color: #666666; +} diff --git a/TUIKit/components/TUIChat/message-input/index.vue b/TUIKit/components/TUIChat/message-input/index.vue index 236c44f..8c7debe 100644 --- a/TUIKit/components/TUIChat/message-input/index.vue +++ b/TUIKit/components/TUIChat/message-input/index.vue @@ -212,7 +212,7 @@ defineExpose({ flex-direction: column; border: none; overflow: hidden; - background: #ebf0f6; + background: #ffffff; &-h5 { padding: 10px 10px 15px; diff --git a/TUIKit/components/TUIChat/message-input/message-input-editor.vue b/TUIKit/components/TUIChat/message-input/message-input-editor.vue index a5d25a2..b3c6e64 100644 --- a/TUIKit/components/TUIChat/message-input/message-input-editor.vue +++ b/TUIKit/components/TUIChat/message-input/message-input-editor.vue @@ -2,22 +2,21 @@
-
+
{{ props.muteText }}
-
+ >
+ />
diff --git a/TUIKit/components/TUIChat/message-list/index.vue b/TUIKit/components/TUIChat/message-list/index.vue index dd20ff7..70dcdf0 100644 --- a/TUIKit/components/TUIChat/message-list/index.vue +++ b/TUIKit/components/TUIChat/message-list/index.vue @@ -616,16 +616,35 @@ const onClaim = (item: IMessageModel, index: number) => { const { conversationType, cloudCustomData, flow, payload } = item const data = JSON.parse(payload.data) - // 群聊 - if (conversationType === TYPES.value.CONV_GROUP) { - console.log(item) - console.log(data) - receiveRedEnvelope({ - redPacketId: data.id - }) - } else { - // 个人红包 - getRedEnvelopeDetail(data.id).then(async (res: any) => { + + getRedEnvelopeDetail(data.id).then(async (res: any) => { + // 群聊 + if (conversationType === TYPES.value.CONV_GROUP) { + if (res.data.hasReceived) { + // 直接去详情页 + navigateTo('/pages/red-packet/details', { + id: data.id, + type: conversationType + }) + } else { + const show = await showDialog('提示', '是否领取该红包?') + if (show) { + // newMessage.in = true + // customRefMessage.value[index].updateClaimStatus(newMessage) + // item.modifyMessage({ + // cloudCustomData: JSON.stringify(newMessage) + // }) + await receiveRedEnvelope({ + redPacketId: data.id + }) + navigateTo('/pages/red-packet/details', { + id: data.id, + type: conversationType + }) + } + } + } else { + // 个人红包 console.log(res) let newMessage = { // ...data, @@ -639,23 +658,37 @@ if (flow === 'in') { if (res.data.hasReceived) { // 直接去详情页 + navigateTo('/pages/red-packet/details', { + id: data.id, + type: conversationType + }) } else { const show = await showDialog('提示', '是否领取该红包?') if (show) { - newMessage.in = true - customRefMessage.value[index].updateClaimStatus(newMessage) - item.modifyMessage({ - cloudCustomData: JSON.stringify(newMessage) + // newMessage.in = true + // customRefMessage.value[index].updateClaimStatus(newMessage) + // item.modifyMessage({ + // cloudCustomData: JSON.stringify(newMessage) + // }) + await receiveRedEnvelope({ + redPacketId: data.id + }) + navigateTo('/pages/red-packet/details', { + id: data.id, + type: conversationType }) } } } else { - - newMessage.out = true - customRefMessage.value[index].updateClaimStatus(newMessage) - item.modifyMessage({ - cloudCustomData: JSON.stringify(newMessage) + navigateTo('/pages/red-packet/details', { + id: data.id, + type: conversationType }) + // newMessage.out = true + // customRefMessage.value[index].updateClaimStatus(newMessage) + // item.modifyMessage({ + // cloudCustomData: JSON.stringify(newMessage) + // }) // .then(() => { // navigateTo('/pages/red-packet/details', { // id: data.id, @@ -663,23 +696,8 @@ // }) // }) } - }) - - return - if (flow === 'in') { - // 修改后的消息 - const newMessage = { - ...data, - isOpen: true - } - item.modifyMessage({ - cloudCustomData: JSON.stringify(newMessage) - }) - receiveRedEnvelope({ - redPacketId: data.id - }) } - } + }) } const resendMessageConfirm = () => { diff --git a/TUIKit/components/TUIChat/message-list/message-elements/message-bubble.vue b/TUIKit/components/TUIChat/message-list/message-elements/message-bubble.vue index 5c10dd4..e9e444d 100644 --- a/TUIKit/components/TUIChat/message-list/message-elements/message-bubble.vue +++ b/TUIKit/components/TUIChat/message-list/message-elements/message-bubble.vue @@ -21,19 +21,24 @@ -
+
{{ props.content.showName }}
-
+
+ /> @@ -67,10 +76,7 @@
-
+
diff --git a/TUIKit/components/TUIChat/message-list/style/index.scss b/TUIKit/components/TUIChat/message-list/style/index.scss index 33bac53..5d3ddb7 100644 --- a/TUIKit/components/TUIChat/message-list/style/index.scss +++ b/TUIKit/components/TUIChat/message-list/style/index.scss @@ -8,4 +8,12 @@ flex-direction: column; box-sizing: border-box; min-width: 0; +} + +.tui-message-list { + background: #fff; +} + +.message-li { + margin-top: 0 !important; } \ No newline at end of file diff --git a/TUIKit/components/TUIChat/utils/sendMessage.ts b/TUIKit/components/TUIChat/utils/sendMessage.ts index fb4e0ee..6495192 100644 --- a/TUIKit/components/TUIChat/utils/sendMessage.ts +++ b/TUIKit/components/TUIChat/utils/sendMessage.ts @@ -89,7 +89,12 @@ export const sendMessages = async ( options.payload.atUserList = content.payload.atUserList; await TUIChatService.sendTextAtMessage(options, sendMessageOptions); } else { - await TUIChatService.sendTextMessage(options, sendMessageOptions); + try { + await TUIChatService.sendTextMessage(options, sendMessageOptions); + } catch (err) { + console.log('发送失败,对方不是你的好友') + + } } break; case 'image': diff --git a/TUIKit/components/TUIContact/contact-info/index.vue b/TUIKit/components/TUIContact/contact-info/index.vue index 2e63a73..bd583eb 100644 --- a/TUIKit/components/TUIContact/contact-info/index.vue +++ b/TUIKit/components/TUIContact/contact-info/index.vue @@ -1,28 +1,34 @@