修复已知问题
This commit is contained in:
2
.env
2
.env
@@ -1,5 +1,5 @@
|
||||
# API
|
||||
# VITE_SYSTEM_URL = "http://ea252b67.natappfree.cc"
|
||||
# VITE_SYSTEM_URL = "http://s7d69cfc.natappfree.cc"
|
||||
VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api"
|
||||
|
||||
# 第三方客户 channelId
|
||||
|
||||
@@ -275,7 +275,6 @@
|
||||
:placeholder-style="`font-family: PingFang SC, PingFang SC; font-weight: 500; color: ${
|
||||
errorData.numShow ? '#f56c6c' : '#a9a9a9'
|
||||
}; font-size: 32rpx; font-style: normal; text-transform: none;`"
|
||||
confirm-type="done"
|
||||
type="number"
|
||||
placeholder="填写红包个数"
|
||||
@input="numInput"
|
||||
@@ -303,7 +302,6 @@
|
||||
:placeholder-style="`font-family: PingFang SC, PingFang SC; font-weight: 500; color: ${
|
||||
errorData.integralShow ? '#f56c6c' : '#a9a9a9'
|
||||
}; font-size: 32rpx; font-style: normal; text-transform: none;`"
|
||||
confirm-type="done"
|
||||
type="digit"
|
||||
placeholder="0.00"
|
||||
@input="monitorInput"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
v-show="isShowReadStatus"
|
||||
:class="{
|
||||
'message-label': true,
|
||||
'unread': isUseUnreadStyle,
|
||||
'finger-point': isHoverFingerPointer,
|
||||
unread: isUseUnreadStyle,
|
||||
'finger-point': isHoverFingerPointer
|
||||
}"
|
||||
@click="openReadUserPanel"
|
||||
>
|
||||
@@ -13,59 +13,66 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, onMounted, onUnmounted } from '../../../../../adapter-vue';
|
||||
import TUIChatEngine, {
|
||||
import {
|
||||
computed,
|
||||
ref,
|
||||
onMounted,
|
||||
onUnmounted
|
||||
} from '../../../../../adapter-vue'
|
||||
import TUIChatEngine, {
|
||||
TUIStore,
|
||||
StoreName,
|
||||
IMessageModel,
|
||||
TUITranslateService,
|
||||
} from '@tencentcloud/chat-uikit-engine-lite';
|
||||
import TUIChatConfig from '../../../config';
|
||||
TUITranslateService
|
||||
} from '@tencentcloud/chat-uikit-engine-lite'
|
||||
import TUIChatConfig from '../../../config'
|
||||
|
||||
interface IProps {
|
||||
message: IMessageModel;
|
||||
}
|
||||
interface IProps {
|
||||
message: IMessageModel
|
||||
}
|
||||
|
||||
interface IEmits {
|
||||
(e: 'openReadUserPanel'): void;
|
||||
}
|
||||
interface IEmits {
|
||||
(e: 'openReadUserPanel'): void
|
||||
}
|
||||
|
||||
const emits = defineEmits<IEmits>();
|
||||
const props = withDefaults(defineProps<IProps>(), {
|
||||
message: () => ({}) as IMessageModel,
|
||||
});
|
||||
const ReadStatus = TUIChatConfig.getFeatureConfig('ReadStatus');
|
||||
const emits = defineEmits<IEmits>()
|
||||
const props = withDefaults(defineProps<IProps>(), {
|
||||
message: () => ({}) as IMessageModel
|
||||
})
|
||||
const ReadStatus = TUIChatConfig.getFeatureConfig('ReadStatus')
|
||||
|
||||
enum ReadState {
|
||||
enum ReadState {
|
||||
Read,
|
||||
Unread,
|
||||
AllRead,
|
||||
NotShow,
|
||||
PartiallyRead,
|
||||
}
|
||||
PartiallyRead
|
||||
}
|
||||
|
||||
const TYPES = TUIChatEngine.TYPES;
|
||||
// User-level read receipt toggle has the highest priority.
|
||||
const isDisplayMessageReadReceipt = ref<boolean>(TUIStore.getData(StoreName.USER, 'displayMessageReadReceipt'));
|
||||
const TYPES = TUIChatEngine.TYPES
|
||||
// User-level read receipt toggle has the highest priority.
|
||||
const isDisplayMessageReadReceipt = ref<boolean>(
|
||||
TUIStore.getData(StoreName.USER, 'displayMessageReadReceipt')
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(() => {
|
||||
TUIStore.watch(StoreName.USER, {
|
||||
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate,
|
||||
});
|
||||
});
|
||||
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate
|
||||
})
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
onUnmounted(() => {
|
||||
TUIStore.unwatch(StoreName.USER, {
|
||||
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate,
|
||||
});
|
||||
});
|
||||
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate
|
||||
})
|
||||
})
|
||||
|
||||
const isShowReadStatus = computed<boolean>(() => {
|
||||
const isShowReadStatus = computed<boolean>(() => {
|
||||
if (!ReadStatus) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
if (!isDisplayMessageReadReceipt.value) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
const {
|
||||
ID,
|
||||
@@ -75,113 +82,127 @@ const isShowReadStatus = computed<boolean>(() => {
|
||||
hasRiskContent,
|
||||
conversationID,
|
||||
conversationType,
|
||||
needReadReceipt = false,
|
||||
} = props.message;
|
||||
needReadReceipt = false
|
||||
} = props.message
|
||||
|
||||
// Asynchronous message strike: Determine if there is risky content after the message has been sent
|
||||
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
|
||||
if (groupProfile?.type === TYPES.GRP_AVCHATROOM || groupProfile?.type === TYPES.GRP_COMMUNITY) {
|
||||
return false;
|
||||
if (
|
||||
groupProfile?.type === TYPES.GRP_AVCHATROOM ||
|
||||
groupProfile?.type === TYPES.GRP_COMMUNITY
|
||||
) {
|
||||
return false
|
||||
}
|
||||
|
||||
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 (message?.getSignalingInfo() !== null) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// Unsuccessful message: Received messages do not display read status
|
||||
if (flow !== 'out' || status !== 'success') {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
|
||||
if (conversationType === 'GROUP') {
|
||||
return needReadReceipt;
|
||||
// return needReadReceipt;
|
||||
return false
|
||||
} else if (conversationType === 'C2C') {
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
return false;
|
||||
});
|
||||
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;
|
||||
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;
|
||||
return isReceiptPeerRead ? ReadState.Read : ReadState.Unread
|
||||
} else {
|
||||
return isPeerRead ? ReadState.Read : ReadState.Unread;
|
||||
return isPeerRead ? ReadState.Read : ReadState.Unread
|
||||
}
|
||||
} else if (conversationType === 'GROUP') {
|
||||
if (needReadReceipt) {
|
||||
if (readCount === 0) {
|
||||
return ReadState.Unread;
|
||||
return ReadState.Unread
|
||||
} else if (unreadCount === 0) {
|
||||
return ReadState.AllRead;
|
||||
return ReadState.AllRead
|
||||
} else {
|
||||
return ReadState.PartiallyRead;
|
||||
return ReadState.PartiallyRead
|
||||
}
|
||||
} else {
|
||||
return ReadState.NotShow;
|
||||
return ReadState.NotShow
|
||||
}
|
||||
}
|
||||
return ReadState.Unread;
|
||||
});
|
||||
return ReadState.Unread
|
||||
})
|
||||
|
||||
const readStatusText = computed(() => {
|
||||
const { readCount = 0 } = props.message.readReceiptInfo;
|
||||
const readStatusText = computed(() => {
|
||||
const { readCount = 0 } = props.message.readReceiptInfo
|
||||
switch (readState.value) {
|
||||
case ReadState.Read:
|
||||
return TUITranslateService.t('TUIChat.已读');
|
||||
return TUITranslateService.t('TUIChat.已读')
|
||||
case ReadState.Unread:
|
||||
return TUITranslateService.t('TUIChat.未读');
|
||||
return TUITranslateService.t('TUIChat.未读')
|
||||
case ReadState.AllRead:
|
||||
return TUITranslateService.t('TUIChat.全部已读');
|
||||
return TUITranslateService.t('TUIChat.全部已读')
|
||||
case ReadState.PartiallyRead:
|
||||
return `${readCount}${TUITranslateService.t('TUIChat.人已读')}`;
|
||||
return `${readCount}${TUITranslateService.t('TUIChat.人已读')}`
|
||||
default:
|
||||
return '';
|
||||
return ''
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
const isUseUnreadStyle = computed(() => {
|
||||
const { conversationType } = props.message;
|
||||
const isUseUnreadStyle = computed(() => {
|
||||
const { conversationType } = props.message
|
||||
if (conversationType === 'C2C') {
|
||||
return readState.value !== ReadState.Read;
|
||||
return readState.value !== ReadState.Read
|
||||
} 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 (
|
||||
props.message.needReadReceipt
|
||||
&& props.message.conversationType === 'GROUP'
|
||||
&& (readState.value === ReadState.PartiallyRead || readState.value === ReadState.Unread)
|
||||
);
|
||||
});
|
||||
props.message.needReadReceipt &&
|
||||
props.message.conversationType === 'GROUP' &&
|
||||
(readState.value === ReadState.PartiallyRead ||
|
||||
readState.value === ReadState.Unread)
|
||||
)
|
||||
})
|
||||
|
||||
function openReadUserPanel() {
|
||||
function openReadUserPanel() {
|
||||
if (isHoverFingerPointer.value) {
|
||||
// emits('openReadUserPanel');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onDisplayMessageReadReceiptUpdate(isDisplay: boolean) {
|
||||
isDisplayMessageReadReceipt.value = isDisplay;
|
||||
}
|
||||
function onDisplayMessageReadReceiptUpdate(isDisplay: boolean) {
|
||||
isDisplayMessageReadReceipt.value = isDisplay
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.message-label {
|
||||
.message-label {
|
||||
align-self: flex-end;
|
||||
font-size: 12px;
|
||||
color: #b6b8ba;
|
||||
@@ -191,10 +212,10 @@ function onDisplayMessageReadReceiptUpdate(isDisplay: boolean) {
|
||||
&.unread {
|
||||
color: #679ce1 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.finger-point {
|
||||
.finger-point {
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
{
|
||||
"path": "pages/my-index/my-team",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的团队",
|
||||
"navigationBarTitleText": "拼团伙伴",
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
}
|
||||
},
|
||||
@@ -339,7 +339,7 @@
|
||||
{
|
||||
"path": "pages/shop-together/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的拼团"
|
||||
"navigationBarTitleText": "拼团"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -429,7 +429,8 @@
|
||||
"backgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white",
|
||||
"app-plus": {
|
||||
"titleNView": false
|
||||
"titleNView": false,
|
||||
"popGesture": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -60,11 +60,10 @@
|
||||
<text v-else class="count-text">{{ audienceCount }}</text>
|
||||
</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"
|
||||
@tap="navigateBack()"
|
||||
src="/static/images/live-end.png"
|
||||
/>
|
||||
</view>
|
||||
@@ -811,6 +810,7 @@
|
||||
imDataEndLive(roomDataId.value, audienceCount.value).then(() => {
|
||||
uni.redirectTo({ url: '/pages/liveend/index' })
|
||||
})
|
||||
// ===================原本代码
|
||||
// endLive({
|
||||
// success: () => {
|
||||
// console.warn(` 退出直播 imDataEndLive`)
|
||||
@@ -830,8 +830,9 @@
|
||||
|
||||
const roomDataId = ref('')
|
||||
const startLive = async () => {
|
||||
console.log(uni.$liveID, '点击开始直播')
|
||||
|
||||
try {
|
||||
console.log('点击开始直播')
|
||||
const data = {
|
||||
coverUrl: coverURL.value,
|
||||
roomName: liveTitle.value,
|
||||
@@ -842,8 +843,8 @@
|
||||
uni.$liveID = roomId
|
||||
liveID.value = roomId
|
||||
const res = await imDataStartLive(roomId)
|
||||
console.log(roomData, '========11111')
|
||||
console.log(res, '========22222')
|
||||
console.log('========11111', roomData)
|
||||
console.log('========22222', res)
|
||||
roomDataId.value = roomId
|
||||
const params = {
|
||||
cursor: '', // 首次拉起传空(不能是null),然后根据回调数据的cursor确认是否拉完
|
||||
@@ -859,9 +860,6 @@
|
||||
console.log(err, '====22')
|
||||
}
|
||||
// ======================原本代码
|
||||
// uni.$liveID = `live_${212211}`
|
||||
|
||||
// console.log(uni?.$liveID, '=====点击开始直播')
|
||||
// createLive({
|
||||
// liveInfo: {
|
||||
// liveID: uni?.$liveID,
|
||||
@@ -886,6 +884,8 @@
|
||||
// setLocalVideoMuteImage()
|
||||
// },
|
||||
// fail: (errCode, errMsg) => {
|
||||
// console.log('============1111',errCode)
|
||||
// console.log('============2222',errMsg)
|
||||
// uni.showToast({
|
||||
// title: '创建直播间失败'
|
||||
// })
|
||||
@@ -1215,9 +1215,9 @@
|
||||
}
|
||||
|
||||
.control-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-left: 16rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.live-content {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{ name: '公司介绍', icon: 'company' },
|
||||
{ name: '朋友圈', icon: 'circle' },
|
||||
{ name: '线上商城', icon: 'mall' },
|
||||
{ name: '我的拼团', icon: 'team' },
|
||||
{ name: '我的拼团伙伴', icon: 'team' },
|
||||
{ name: '项目入口', icon: 'project' },
|
||||
{ name: '直播列表', icon: 'liveStream' }
|
||||
]
|
||||
|
||||
@@ -12,14 +12,12 @@
|
||||
icon: 'wallet',
|
||||
url: '/pages/my-index/wallet/index'
|
||||
},
|
||||
// #ifdef H5
|
||||
{
|
||||
name: '邀请好友',
|
||||
icon: 'user-code',
|
||||
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: '直播记录',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<!-- 顶部卡片 -->
|
||||
<view class="top-card">
|
||||
<view class="num-box">
|
||||
<text>我的拼团(人)</text>
|
||||
<text>我的拼团伙伴(人)</text>
|
||||
<text>{{ userInfo.teamCount }}</text>
|
||||
</view>
|
||||
<image
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="divider"></view>
|
||||
|
||||
<view class="card-item">
|
||||
@@ -54,11 +54,19 @@
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="share-tips">
|
||||
<text>将邀请码发送给好友即可完成邀请</text>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<view class="share-tips">
|
||||
<text>将链接或邀请码发送给好友即可完成邀请</text>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 可选:添加分享按钮(如微信、朋友圈等) -->
|
||||
<!-- <button class="share-btn">分享到微信</button> -->
|
||||
|
||||
@@ -110,7 +110,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
await useLoginState().login({
|
||||
sdkappID: tencentUserSig.value.sdkappID,
|
||||
sdkAppID: tencentUserSig.value.sdkappID,
|
||||
userID: tencentUserSig.value.userId,
|
||||
userSig: tencentUserSig.value.userSig
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user