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 @@