修复已知问题

This commit is contained in:
cbb
2026-02-02 15:45:24 +08:00
parent f4e3496e3c
commit fa0faa6be6
10 changed files with 220 additions and 194 deletions

2
.env
View File

@@ -1,5 +1,5 @@
# API # API
# VITE_SYSTEM_URL = "http://ea252b67.natappfree.cc" # VITE_SYSTEM_URL = "http://s7d69cfc.natappfree.cc"
VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api" VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api"
# 第三方客户 channelId # 第三方客户 channelId

View File

@@ -275,7 +275,6 @@
:placeholder-style="`font-family: PingFang SC, PingFang SC; font-weight: 500; color: ${ :placeholder-style="`font-family: PingFang SC, PingFang SC; font-weight: 500; color: ${
errorData.numShow ? '#f56c6c' : '#a9a9a9' errorData.numShow ? '#f56c6c' : '#a9a9a9'
}; font-size: 32rpx; font-style: normal; text-transform: none;`" }; font-size: 32rpx; font-style: normal; text-transform: none;`"
confirm-type="done"
type="number" type="number"
placeholder="填写红包个数" placeholder="填写红包个数"
@input="numInput" @input="numInput"
@@ -303,7 +302,6 @@
:placeholder-style="`font-family: PingFang SC, PingFang SC; font-weight: 500; color: ${ :placeholder-style="`font-family: PingFang SC, PingFang SC; font-weight: 500; color: ${
errorData.integralShow ? '#f56c6c' : '#a9a9a9' errorData.integralShow ? '#f56c6c' : '#a9a9a9'
}; font-size: 32rpx; font-style: normal; text-transform: none;`" }; font-size: 32rpx; font-style: normal; text-transform: none;`"
confirm-type="done"
type="digit" type="digit"
placeholder="0.00" placeholder="0.00"
@input="monitorInput" @input="monitorInput"

View File

@@ -3,8 +3,8 @@
v-show="isShowReadStatus" v-show="isShowReadStatus"
:class="{ :class="{
'message-label': true, 'message-label': true,
'unread': isUseUnreadStyle, unread: isUseUnreadStyle,
'finger-point': isHoverFingerPointer, 'finger-point': isHoverFingerPointer
}" }"
@click="openReadUserPanel" @click="openReadUserPanel"
> >
@@ -13,59 +13,66 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed, ref, onMounted, onUnmounted } from '../../../../../adapter-vue'; import {
computed,
ref,
onMounted,
onUnmounted
} from '../../../../../adapter-vue'
import TUIChatEngine, { import TUIChatEngine, {
TUIStore, TUIStore,
StoreName, StoreName,
IMessageModel, IMessageModel,
TUITranslateService, TUITranslateService
} from '@tencentcloud/chat-uikit-engine-lite'; } from '@tencentcloud/chat-uikit-engine-lite'
import TUIChatConfig from '../../../config'; import TUIChatConfig from '../../../config'
interface IProps { interface IProps {
message: IMessageModel; message: IMessageModel
} }
interface IEmits { interface IEmits {
(e: 'openReadUserPanel'): void; (e: 'openReadUserPanel'): void
} }
const emits = defineEmits<IEmits>(); const emits = defineEmits<IEmits>()
const props = withDefaults(defineProps<IProps>(), { const props = withDefaults(defineProps<IProps>(), {
message: () => ({}) as IMessageModel, message: () => ({}) as IMessageModel
}); })
const ReadStatus = TUIChatConfig.getFeatureConfig('ReadStatus'); const ReadStatus = TUIChatConfig.getFeatureConfig('ReadStatus')
enum ReadState { enum ReadState {
Read, Read,
Unread, Unread,
AllRead, AllRead,
NotShow, NotShow,
PartiallyRead, PartiallyRead
} }
const TYPES = TUIChatEngine.TYPES; const TYPES = TUIChatEngine.TYPES
// User-level read receipt toggle has the highest priority. // User-level read receipt toggle has the highest priority.
const isDisplayMessageReadReceipt = ref<boolean>(TUIStore.getData(StoreName.USER, 'displayMessageReadReceipt')); const isDisplayMessageReadReceipt = ref<boolean>(
TUIStore.getData(StoreName.USER, 'displayMessageReadReceipt')
)
onMounted(() => { onMounted(() => {
TUIStore.watch(StoreName.USER, { TUIStore.watch(StoreName.USER, {
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate, displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate
}); })
}); })
onUnmounted(() => { onUnmounted(() => {
TUIStore.unwatch(StoreName.USER, { TUIStore.unwatch(StoreName.USER, {
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate, displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate
}); })
}); })
const isShowReadStatus = computed<boolean>(() => { const isShowReadStatus = computed<boolean>(() => {
if (!ReadStatus) { if (!ReadStatus) {
return false; return false
} }
if (!isDisplayMessageReadReceipt.value) { if (!isDisplayMessageReadReceipt.value) {
return false; return false
} }
const { const {
ID, ID,
@@ -75,99 +82,113 @@ const isShowReadStatus = computed<boolean>(() => {
hasRiskContent, hasRiskContent,
conversationID, conversationID,
conversationType, conversationType,
needReadReceipt = false, needReadReceipt = false
} = props.message; } = props.message
// Asynchronous message strike: Determine if there is risky content after the message has been sent // Asynchronous message strike: Determine if there is risky content after the message has been sent
if (hasRiskContent) { if (hasRiskContent) {
return false; return false
} }
const { groupProfile } = TUIStore.getConversationModel(conversationID) || {}; const { groupProfile } =
TUIStore.getConversationModel(conversationID) || {}
// AVCHATROOM and COMMUNITY chats do not display read status // AVCHATROOM and COMMUNITY chats do not display read status
if (groupProfile?.type === TYPES.GRP_AVCHATROOM || groupProfile?.type === TYPES.GRP_COMMUNITY) { if (
return false; groupProfile?.type === TYPES.GRP_AVCHATROOM ||
groupProfile?.type === TYPES.GRP_COMMUNITY
) {
return false
} }
if (type === TYPES.MSG_CUSTOM) { if (type === TYPES.MSG_CUSTOM) {
const message = TUIStore.getMessageModel(ID); const message = TUIStore.getMessageModel(ID)
// If it is a signaling message, do not display the read status // If it is a signaling message, do not display the read status
if (message?.getSignalingInfo() !== null) { if (message?.getSignalingInfo() !== null) {
return false; return false
} }
} }
// Unsuccessful message: Received messages do not display read status // Unsuccessful message: Received messages do not display read status
if (flow !== 'out' || status !== 'success') { if (flow !== 'out' || status !== 'success') {
return false; return false
} }
if (conversationType === 'GROUP') { if (conversationType === 'GROUP') {
return needReadReceipt; // return needReadReceipt;
return false
} else if (conversationType === 'C2C') { } else if (conversationType === 'C2C') {
return true; return true
} }
return false; return false
}); })
const readState = computed<ReadState>(() => { const readState = computed<ReadState>(() => {
const { conversationType, needReadReceipt = false, isPeerRead = false } = props.message; const {
const { readCount = 0, unreadCount = 0, isPeerRead: isReceiptPeerRead = false } = props.message.readReceiptInfo; conversationType,
needReadReceipt = false,
isPeerRead = false
} = props.message
const {
readCount = 0,
unreadCount = 0,
isPeerRead: isReceiptPeerRead = false
} = props.message.readReceiptInfo
if (conversationType === 'C2C') { if (conversationType === 'C2C') {
if (needReadReceipt) { if (needReadReceipt) {
return isReceiptPeerRead ? ReadState.Read : ReadState.Unread; return isReceiptPeerRead ? ReadState.Read : ReadState.Unread
} else { } else {
return isPeerRead ? ReadState.Read : ReadState.Unread; return isPeerRead ? ReadState.Read : ReadState.Unread
} }
} else if (conversationType === 'GROUP') { } else if (conversationType === 'GROUP') {
if (needReadReceipt) { if (needReadReceipt) {
if (readCount === 0) { if (readCount === 0) {
return ReadState.Unread; return ReadState.Unread
} else if (unreadCount === 0) { } else if (unreadCount === 0) {
return ReadState.AllRead; return ReadState.AllRead
} else { } else {
return ReadState.PartiallyRead; return ReadState.PartiallyRead
} }
} else { } else {
return ReadState.NotShow; return ReadState.NotShow
} }
} }
return ReadState.Unread; return ReadState.Unread
}); })
const readStatusText = computed(() => { const readStatusText = computed(() => {
const { readCount = 0 } = props.message.readReceiptInfo; const { readCount = 0 } = props.message.readReceiptInfo
switch (readState.value) { switch (readState.value) {
case ReadState.Read: case ReadState.Read:
return TUITranslateService.t('TUIChat.已读'); return TUITranslateService.t('TUIChat.已读')
case ReadState.Unread: case ReadState.Unread:
return TUITranslateService.t('TUIChat.未读'); return TUITranslateService.t('TUIChat.未读')
case ReadState.AllRead: case ReadState.AllRead:
return TUITranslateService.t('TUIChat.全部已读'); return TUITranslateService.t('TUIChat.全部已读')
case ReadState.PartiallyRead: case ReadState.PartiallyRead:
return `${readCount}${TUITranslateService.t('TUIChat.人已读')}`; return `${readCount}${TUITranslateService.t('TUIChat.人已读')}`
default: default:
return ''; return ''
} }
}); })
const isUseUnreadStyle = computed(() => { const isUseUnreadStyle = computed(() => {
const { conversationType } = props.message; const { conversationType } = props.message
if (conversationType === 'C2C') { if (conversationType === 'C2C') {
return readState.value !== ReadState.Read; return readState.value !== ReadState.Read
} else if (conversationType === 'GROUP') { } else if (conversationType === 'GROUP') {
return readState.value !== ReadState.AllRead; return readState.value !== ReadState.AllRead
} }
return false; return false
}); })
const isHoverFingerPointer = computed<boolean>(() => { const isHoverFingerPointer = computed<boolean>(() => {
return ( return (
props.message.needReadReceipt props.message.needReadReceipt &&
&& props.message.conversationType === 'GROUP' props.message.conversationType === 'GROUP' &&
&& (readState.value === ReadState.PartiallyRead || readState.value === ReadState.Unread) (readState.value === ReadState.PartiallyRead ||
); readState.value === ReadState.Unread)
}); )
})
function openReadUserPanel() { function openReadUserPanel() {
if (isHoverFingerPointer.value) { if (isHoverFingerPointer.value) {
@@ -176,7 +197,7 @@ function openReadUserPanel() {
} }
function onDisplayMessageReadReceiptUpdate(isDisplay: boolean) { function onDisplayMessageReadReceiptUpdate(isDisplay: boolean) {
isDisplayMessageReadReceipt.value = isDisplay; isDisplayMessageReadReceipt.value = isDisplay
} }
</script> </script>

View File

@@ -204,7 +204,7 @@
{ {
"path": "pages/my-index/my-team", "path": "pages/my-index/my-team",
"style": { "style": {
"navigationBarTitleText": "我的团队", "navigationBarTitleText": "拼团伙伴",
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
}, },
@@ -339,7 +339,7 @@
{ {
"path": "pages/shop-together/index", "path": "pages/shop-together/index",
"style": { "style": {
"navigationBarTitleText": "我的拼团" "navigationBarTitleText": "拼团"
} }
}, },
{ {
@@ -429,7 +429,8 @@
"backgroundColor": "#000000", "backgroundColor": "#000000",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": false "titleNView": false,
"popGesture": "none"
} }
} }
}, },

View File

@@ -60,11 +60,10 @@
<text v-else class="count-text">{{ audienceCount }}</text> <text v-else class="count-text">{{ audienceCount }}</text>
</view> </view>
</view> </view>
<view class="control-icons"> <view class="control-icons" @tap="navigateBack()">
<!-- <image class="control-icon" src="/static/images/live-share.png" /> --> <!-- <image class="control-icon" src="/static/images/live-share.png" /> -->
<image <image
class="control-icon" class="control-icon"
@tap="navigateBack()"
src="/static/images/live-end.png" src="/static/images/live-end.png"
/> />
</view> </view>
@@ -811,6 +810,7 @@
imDataEndLive(roomDataId.value, audienceCount.value).then(() => { imDataEndLive(roomDataId.value, audienceCount.value).then(() => {
uni.redirectTo({ url: '/pages/liveend/index' }) uni.redirectTo({ url: '/pages/liveend/index' })
}) })
// ===================原本代码
// endLive({ // endLive({
// success: () => { // success: () => {
// console.warn(` 退出直播 imDataEndLive`) // console.warn(` 退出直播 imDataEndLive`)
@@ -830,8 +830,9 @@
const roomDataId = ref('') const roomDataId = ref('')
const startLive = async () => { const startLive = async () => {
console.log(uni.$liveID, '点击开始直播')
try { try {
console.log('点击开始直播')
const data = { const data = {
coverUrl: coverURL.value, coverUrl: coverURL.value,
roomName: liveTitle.value, roomName: liveTitle.value,
@@ -842,8 +843,8 @@
uni.$liveID = roomId uni.$liveID = roomId
liveID.value = roomId liveID.value = roomId
const res = await imDataStartLive(roomId) const res = await imDataStartLive(roomId)
console.log(roomData, '========11111') console.log('========11111', roomData)
console.log(res, '========22222') console.log('========22222', res)
roomDataId.value = roomId roomDataId.value = roomId
const params = { const params = {
cursor: '', // 首次拉起传空不能是null),然后根据回调数据的cursor确认是否拉完 cursor: '', // 首次拉起传空不能是null),然后根据回调数据的cursor确认是否拉完
@@ -859,9 +860,6 @@
console.log(err, '====22') console.log(err, '====22')
} }
// ======================原本代码 // ======================原本代码
// uni.$liveID = `live_${212211}`
// console.log(uni?.$liveID, '=====点击开始直播')
// createLive({ // createLive({
// liveInfo: { // liveInfo: {
// liveID: uni?.$liveID, // liveID: uni?.$liveID,
@@ -886,6 +884,8 @@
// setLocalVideoMuteImage() // setLocalVideoMuteImage()
// }, // },
// fail: (errCode, errMsg) => { // fail: (errCode, errMsg) => {
// console.log('============1111',errCode)
// console.log('============2222',errMsg)
// uni.showToast({ // uni.showToast({
// title: '创建直播间失败' // title: '创建直播间失败'
// }) // })
@@ -1215,9 +1215,9 @@
} }
.control-icon { .control-icon {
width: 36rpx; width: 40rpx;
height: 36rpx; height: 40rpx;
margin-left: 16rpx; margin-left: 20rpx;
} }
.live-content { .live-content {

View File

@@ -11,7 +11,7 @@
{ name: '公司介绍', icon: 'company' }, { name: '公司介绍', icon: 'company' },
{ name: '朋友圈', icon: 'circle' }, { name: '朋友圈', icon: 'circle' },
{ name: '线上商城', icon: 'mall' }, { name: '线上商城', icon: 'mall' },
{ name: '我的拼团', icon: 'team' }, { name: '我的拼团伙伴', icon: 'team' },
{ name: '项目入口', icon: 'project' }, { name: '项目入口', icon: 'project' },
{ name: '直播列表', icon: 'liveStream' } { name: '直播列表', icon: 'liveStream' }
] ]

View File

@@ -12,14 +12,12 @@
icon: 'wallet', icon: 'wallet',
url: '/pages/my-index/wallet/index' url: '/pages/my-index/wallet/index'
}, },
// #ifdef H5
{ {
name: '邀请好友', name: '邀请好友',
icon: 'user-code', icon: 'user-code',
url: '/pages/my-index/wallet/invite' url: '/pages/my-index/wallet/invite'
}, },
// #endif { name: '我的拼团伙伴', icon: 'team', url: '/pages/my-index/my-team' },
{ name: '我的拼团', icon: 'team', url: '/pages/my-index/my-team' },
// { name: '群创建直播', icon: 'videocam', url: '' }, // { name: '群创建直播', icon: 'videocam', url: '' },
{ {
name: '直播记录', name: '直播记录',

View File

@@ -9,7 +9,7 @@
<!-- 顶部卡片 --> <!-- 顶部卡片 -->
<view class="top-card"> <view class="top-card">
<view class="num-box"> <view class="num-box">
<text>我的拼团()</text> <text>我的拼团伙伴()</text>
<text>{{ userInfo.teamCount }}</text> <text>{{ userInfo.teamCount }}</text>
</view> </view>
<image <image

View File

@@ -42,7 +42,7 @@
</button> </button>
</view> </view>
</view> </view>
<!-- #ifdef H5 -->
<view class="divider"></view> <view class="divider"></view>
<view class="card-item"> <view class="card-item">
@@ -54,11 +54,19 @@
</button> </button>
</view> </view>
</view> </view>
<!-- #endif -->
</view> </view>
<!-- #ifdef H5 -->
<view class="share-tips">
<text>将邀请码发送给好友即可完成邀请</text>
</view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<view class="share-tips"> <view class="share-tips">
<text>将链接或邀请码发送给好友即可完成邀请</text> <text>将链接或邀请码发送给好友即可完成邀请</text>
</view> </view>
<!-- #endif -->
<!-- 可选添加分享按钮如微信朋友圈等 --> <!-- 可选添加分享按钮如微信朋友圈等 -->
<!-- <button class="share-btn">分享到微信</button> --> <!-- <button class="share-btn">分享到微信</button> -->

View File

@@ -110,7 +110,7 @@ export const useUserStore = defineStore('user', () => {
// #ifdef APP-PLUS // #ifdef APP-PLUS
await useLoginState().login({ await useLoginState().login({
sdkappID: tencentUserSig.value.sdkappID, sdkAppID: tencentUserSig.value.sdkappID,
userID: tencentUserSig.value.userId, userID: tencentUserSig.value.userId,
userSig: tencentUserSig.value.userSig userSig: tencentUserSig.value.userSig
}) })