修复已知问题

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,188 +13,209 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed, ref, onMounted, onUnmounted } from '../../../../../adapter-vue'; import {
import TUIChatEngine, { computed,
TUIStore, ref,
StoreName, onMounted,
IMessageModel, onUnmounted
TUITranslateService, } from '../../../../../adapter-vue'
} from '@tencentcloud/chat-uikit-engine-lite'; import TUIChatEngine, {
import TUIChatConfig from '../../../config'; TUIStore,
StoreName,
IMessageModel,
TUITranslateService
} from '@tencentcloud/chat-uikit-engine-lite'
import TUIChatConfig from '../../../config'
interface IProps { interface IProps {
message: IMessageModel; message: IMessageModel
}
interface IEmits {
(e: 'openReadUserPanel'): void;
}
const emits = defineEmits<IEmits>();
const props = withDefaults(defineProps<IProps>(), {
message: () => ({}) as IMessageModel,
});
const ReadStatus = TUIChatConfig.getFeatureConfig('ReadStatus');
enum ReadState {
Read,
Unread,
AllRead,
NotShow,
PartiallyRead,
}
const TYPES = TUIChatEngine.TYPES;
// User-level read receipt toggle has the highest priority.
const isDisplayMessageReadReceipt = ref<boolean>(TUIStore.getData(StoreName.USER, 'displayMessageReadReceipt'));
onMounted(() => {
TUIStore.watch(StoreName.USER, {
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate,
});
});
onUnmounted(() => {
TUIStore.unwatch(StoreName.USER, {
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate,
});
});
const isShowReadStatus = computed<boolean>(() => {
if (!ReadStatus) {
return false;
}
if (!isDisplayMessageReadReceipt.value) {
return false;
}
const {
ID,
type,
flow,
status,
hasRiskContent,
conversationID,
conversationType,
needReadReceipt = false,
} = props.message;
// Asynchronous message strike: Determine if there is risky content after the message has been sent
if (hasRiskContent) {
return false;
} }
const { groupProfile } = TUIStore.getConversationModel(conversationID) || {}; interface IEmits {
// AVCHATROOM and COMMUNITY chats do not display read status (e: 'openReadUserPanel'): void
if (groupProfile?.type === TYPES.GRP_AVCHATROOM || groupProfile?.type === TYPES.GRP_COMMUNITY) {
return false;
} }
if (type === TYPES.MSG_CUSTOM) { const emits = defineEmits<IEmits>()
const message = TUIStore.getMessageModel(ID); const props = withDefaults(defineProps<IProps>(), {
// If it is a signaling message, do not display the read status message: () => ({}) as IMessageModel
if (message?.getSignalingInfo() !== null) { })
return false; const ReadStatus = TUIChatConfig.getFeatureConfig('ReadStatus')
enum ReadState {
Read,
Unread,
AllRead,
NotShow,
PartiallyRead
}
const TYPES = TUIChatEngine.TYPES
// User-level read receipt toggle has the highest priority.
const isDisplayMessageReadReceipt = ref<boolean>(
TUIStore.getData(StoreName.USER, 'displayMessageReadReceipt')
)
onMounted(() => {
TUIStore.watch(StoreName.USER, {
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate
})
})
onUnmounted(() => {
TUIStore.unwatch(StoreName.USER, {
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate
})
})
const isShowReadStatus = computed<boolean>(() => {
if (!ReadStatus) {
return false
} }
} if (!isDisplayMessageReadReceipt.value) {
return false
// Unsuccessful message: Received messages do not display read status
if (flow !== 'out' || status !== 'success') {
return false;
}
if (conversationType === 'GROUP') {
return needReadReceipt;
} else if (conversationType === 'C2C') {
return true;
}
return false;
});
const readState = computed<ReadState>(() => {
const { conversationType, needReadReceipt = false, isPeerRead = false } = props.message;
const { readCount = 0, unreadCount = 0, isPeerRead: isReceiptPeerRead = false } = props.message.readReceiptInfo;
if (conversationType === 'C2C') {
if (needReadReceipt) {
return isReceiptPeerRead ? ReadState.Read : ReadState.Unread;
} else {
return isPeerRead ? ReadState.Read : ReadState.Unread;
} }
} else if (conversationType === 'GROUP') { const {
if (needReadReceipt) { ID,
if (readCount === 0) { type,
return ReadState.Unread; flow,
} else if (unreadCount === 0) { status,
return ReadState.AllRead; hasRiskContent,
} else { conversationID,
return ReadState.PartiallyRead; conversationType,
needReadReceipt = false
} = props.message
// Asynchronous message strike: Determine if there is risky content after the message has been sent
if (hasRiskContent) {
return false
}
const { groupProfile } =
TUIStore.getConversationModel(conversationID) || {}
// AVCHATROOM and COMMUNITY chats do not display read status
if (
groupProfile?.type === TYPES.GRP_AVCHATROOM ||
groupProfile?.type === TYPES.GRP_COMMUNITY
) {
return false
}
if (type === TYPES.MSG_CUSTOM) {
const message = TUIStore.getMessageModel(ID)
// If it is a signaling message, do not display the read status
if (message?.getSignalingInfo() !== null) {
return false
} }
} else { }
return ReadState.NotShow;
// Unsuccessful message: Received messages do not display read status
if (flow !== 'out' || status !== 'success') {
return false
}
if (conversationType === 'GROUP') {
// return needReadReceipt;
return false
} else if (conversationType === 'C2C') {
return true
}
return false
})
const readState = computed<ReadState>(() => {
const {
conversationType,
needReadReceipt = false,
isPeerRead = false
} = props.message
const {
readCount = 0,
unreadCount = 0,
isPeerRead: isReceiptPeerRead = false
} = props.message.readReceiptInfo
if (conversationType === 'C2C') {
if (needReadReceipt) {
return isReceiptPeerRead ? ReadState.Read : ReadState.Unread
} else {
return isPeerRead ? ReadState.Read : ReadState.Unread
}
} else if (conversationType === 'GROUP') {
if (needReadReceipt) {
if (readCount === 0) {
return ReadState.Unread
} else if (unreadCount === 0) {
return ReadState.AllRead
} else {
return ReadState.PartiallyRead
}
} else {
return ReadState.NotShow
}
}
return ReadState.Unread
})
const readStatusText = computed(() => {
const { readCount = 0 } = props.message.readReceiptInfo
switch (readState.value) {
case ReadState.Read:
return TUITranslateService.t('TUIChat.已读')
case ReadState.Unread:
return TUITranslateService.t('TUIChat.未读')
case ReadState.AllRead:
return TUITranslateService.t('TUIChat.全部已读')
case ReadState.PartiallyRead:
return `${readCount}${TUITranslateService.t('TUIChat.人已读')}`
default:
return ''
}
})
const isUseUnreadStyle = computed(() => {
const { conversationType } = props.message
if (conversationType === 'C2C') {
return readState.value !== ReadState.Read
} else if (conversationType === 'GROUP') {
return readState.value !== ReadState.AllRead
}
return false
})
const isHoverFingerPointer = computed<boolean>(() => {
return (
props.message.needReadReceipt &&
props.message.conversationType === 'GROUP' &&
(readState.value === ReadState.PartiallyRead ||
readState.value === ReadState.Unread)
)
})
function openReadUserPanel() {
if (isHoverFingerPointer.value) {
// emits('openReadUserPanel');
} }
} }
return ReadState.Unread;
});
const readStatusText = computed(() => { function onDisplayMessageReadReceiptUpdate(isDisplay: boolean) {
const { readCount = 0 } = props.message.readReceiptInfo; isDisplayMessageReadReceipt.value = isDisplay
switch (readState.value) {
case ReadState.Read:
return TUITranslateService.t('TUIChat.已读');
case ReadState.Unread:
return TUITranslateService.t('TUIChat.未读');
case ReadState.AllRead:
return TUITranslateService.t('TUIChat.全部已读');
case ReadState.PartiallyRead:
return `${readCount}${TUITranslateService.t('TUIChat.人已读')}`;
default:
return '';
} }
});
const isUseUnreadStyle = computed(() => {
const { conversationType } = props.message;
if (conversationType === 'C2C') {
return readState.value !== ReadState.Read;
} else if (conversationType === 'GROUP') {
return readState.value !== ReadState.AllRead;
}
return false;
});
const isHoverFingerPointer = computed<boolean>(() => {
return (
props.message.needReadReceipt
&& props.message.conversationType === 'GROUP'
&& (readState.value === ReadState.PartiallyRead || readState.value === ReadState.Unread)
);
});
function openReadUserPanel() {
if (isHoverFingerPointer.value) {
// emits('openReadUserPanel');
}
}
function onDisplayMessageReadReceiptUpdate(isDisplay: boolean) {
isDisplayMessageReadReceipt.value = isDisplay;
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.message-label { .message-label {
align-self: flex-end; align-self: flex-end;
font-size: 12px; font-size: 12px;
color: #b6b8ba; color: #b6b8ba;
word-break: keep-all; word-break: keep-all;
flex: 0 0 auto; flex: 0 0 auto;
&.unread { &.unread {
color: #679ce1 !important; color: #679ce1 !important;
}
} }
}
.finger-point { .finger-point {
cursor: pointer; cursor: pointer;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
</style> </style>

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
}) })