diff --git a/.env b/.env index a885097..ba95087 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ # API -# VITE_SYSTEM_URL = "http://ha699de6.natappfree.cc" -VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api" +VITE_SYSTEM_URL = "http://ea252b67.natappfree.cc" +# VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api" # 第三方客户 channelId VITE_CHANNEL_ID = "7b81ec142eca42baa045820793b821bb" diff --git a/TUIKit/components/TUIChat/chat-header/index.vue b/TUIKit/components/TUIChat/chat-header/index.vue index f022412..6d94eef 100644 --- a/TUIKit/components/TUIChat/chat-header/index.vue +++ b/TUIKit/components/TUIChat/chat-header/index.vue @@ -30,11 +30,12 @@ import backSVG from '../../../assets/icon/back.svg' import { useUI } from '../../../../utils/use-ui' import { endUserService } from '../../../../api/my-index' + import { navigateBack, reLaunch } from '../../../../utils/router' const { showDialog, showToast } = useUI() const emits = defineEmits(['openGroupManagement']) - const props = defineProps(['isGroup', 'serviceID']) + const props = defineProps(['isGroup', 'serviceID', 'type']) const currentConversation = ref() const typingStatus = ref(false) @@ -91,15 +92,19 @@ } const back = async () => { + if (props.type === 'GROUP') { + reLaunch('/') + return + } if (props.serviceID) { const show = await showDialog('提示', '确定要退出当前会话吗?') if (show) { await endUserService(props.serviceID) await showToast('结束服务成功') - uni.navigateBack() + navigateBack() } } else { - uni.navigateBack() + navigateBack() } } diff --git a/TUIKit/components/TUIChat/index.vue b/TUIKit/components/TUIChat/index.vue index 69da4bf..cfcac63 100644 --- a/TUIKit/components/TUIChat/index.vue +++ b/TUIKit/components/TUIChat/index.vue @@ -1,5 +1,6 @@ + + @@ -125,6 +141,7 @@ import star from '../../../../assets/icon/star-light.png' import unopenedEnvelope from '../../../../assets/icon/unopened-envelope.svg' import kaiEnvelope from '../../../../assets/icon/kai-unopened-envelope.svg' +import { navigateTo } from '../../../../../utils/router' interface Props { messageItem: IMessageModel @@ -173,6 +190,16 @@ } }) + /** 商品详情显示数据 */ + const goodsData = computed(() => { + return JSON.parse(props.messageItem.payload.data) + }) + + /** 点击商品详情 */ + const onGoods = () => { + navigateTo('/pages/mall/detail', { productId: goodsData.value.id }) + } + watchEffect(() => { custom.value = props.content message.value = props.messageItem @@ -298,4 +325,38 @@ color: #ffffff; } } + + .goods-box { + display: flex; + .img-box { + flex-shrink: 0; + width: 180rpx; + height: 240rpx; + border-radius: 12rpx; + overflow: hidden; + background: rgb(182, 182, 182); + margin-right: 20rpx; + } + .right-box { + width: 50vw; + display: flex; + flex-direction: column; + justify-content: space-between; + .name { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + font-size: 28rpx; + font-weight: 400; + color: #333333; + } + .price { + font-size: 28rpx; + font-weight: 500; + color: #ff7201; + } + } + } diff --git a/TUIKit/components/TUIChat/message-list/message-elements/read-status/index.vue b/TUIKit/components/TUIChat/message-list/message-elements/read-status/index.vue index b0b0285..9c7fba9 100644 --- a/TUIKit/components/TUIChat/message-list/message-elements/read-status/index.vue +++ b/TUIKit/components/TUIChat/message-list/message-elements/read-status/index.vue @@ -171,7 +171,7 @@ const isHoverFingerPointer = computed(() => { function openReadUserPanel() { if (isHoverFingerPointer.value) { - emits('openReadUserPanel'); + // emits('openReadUserPanel'); } } diff --git a/TUIKit/components/TUIConversation/conversation-list/index.vue b/TUIKit/components/TUIConversation/conversation-list/index.vue index d287552..4ccbeb6 100644 --- a/TUIKit/components/TUIConversation/conversation-list/index.vue +++ b/TUIKit/components/TUIConversation/conversation-list/index.vue @@ -380,19 +380,25 @@ /** 是否最开始创建群聊 */ const isFirstCreateGroup = (item: IConversationModel) => { - // 打印 - if (item.type === 'GROUP' && item?.lastMessage?.payload?.data) { - const data = JSON.parse(item?.lastMessage?.payload?.data) - return data.content === 'Create Group' - ? `${item.getLastMessage('text')?.split(':')[0]}:创建群聊` - : '' - } + // if (item.type === 'GROUP' && item?.lastMessage?.payload?.data) { + // const data = JSON.parse(item?.lastMessage?.payload?.data) + // return data.content === 'Create Group' + // ? `${item.getLastMessage('text')?.split(':')[0]}:创建群聊` + // : '' + // } if (item?.lastMessage?.payload?.data) { const data = JSON.parse(item?.lastMessage?.payload?.data) + const text = item.getLastMessage('text')?.split(':') + const isText = text && text.length > 1 if (data.businessID === CHAT_MSG_CUSTOM_TYPE.GOODS) { - console.log(item, '==2222222=') - - return `自定义数据--` + if (isText) { + return `${text[0]}:[商品信息] ${data.title}` + } else { + return `[商品信息]:${data.title}` + } + } + if (data.content === 'Create Group' && item.type === 'GROUP') { + return `${item.getLastMessage('text')?.split(':')[0]}:创建群聊` } return '' } diff --git a/TUIKit/components/common/Avatar/index.vue b/TUIKit/components/common/Avatar/index.vue index a7767e8..6657a77 100644 --- a/TUIKit/components/common/Avatar/index.vue +++ b/TUIKit/components/common/Avatar/index.vue @@ -6,6 +6,7 @@ height: avatarSize, borderRadius: '80rpx' }" + @click="onTopAvatar" >