From a84da4bc0ec70a4681c9bc8dfcb79767634c06e8 Mon Sep 17 00:00:00 2001 From: bobobobo <1055026847@qq.com> Date: Fri, 6 Feb 2026 21:30:05 +0800 Subject: [PATCH 1/3] QAQ --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 558669c..2d5d689 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,8 @@ unaipp多端im+会议+积分商城 ```https://cloud.tencent.com/document/product/647/111859``` ### 聊天列表 -```https://cloud.tencent.com/document/product/269/105582``` \ No newline at end of file +```https://cloud.tencent.com/document/product/269/105582``` + + +### 文档地址 +```https://dev.cqjcteach.cn/prod-api/doc.html#/home``` \ No newline at end of file From 35f728dceb59bff8bad3a619a66da45d14fa8139 Mon Sep 17 00:00:00 2001 From: bobobobo <1055026847@qq.com> Date: Fri, 6 Feb 2026 22:14:19 +0800 Subject: [PATCH 2/3] QAQ --- pages.json | 2 +- pages/discover/discover.vue | 3 ++- static/images/discover/shopping.png | Bin 0 -> 2834 bytes 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 static/images/discover/shopping.png diff --git a/pages.json b/pages.json index e259bfc..d201486 100644 --- a/pages.json +++ b/pages.json @@ -340,7 +340,7 @@ { "path": "pages/shop-together/index", "style": { - "navigationBarTitleText": "购买记录" + "navigationBarTitleText": "拼团" } }, { diff --git a/pages/discover/discover.vue b/pages/discover/discover.vue index ead6b02..a1ae4f9 100644 --- a/pages/discover/discover.vue +++ b/pages/discover/discover.vue @@ -11,7 +11,8 @@ { name: '公司介绍', icon: 'company' }, { name: '朋友圈', icon: 'circle' }, { name: '线上商城', icon: 'mall' }, - { name: '购买记录', icon: 'team' }, + { name: '我的拼团伙伴', icon: 'team' }, + { name: '购买记录', icon: 'shopping' }, { name: '项目入口', icon: 'project' }, { name: '直播列表', icon: 'liveStream' } ] diff --git a/static/images/discover/shopping.png b/static/images/discover/shopping.png new file mode 100644 index 0000000000000000000000000000000000000000..0bf9e62912a26e7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0ZYR#yT4W9q63#Ox zjd`d5W*`h`O})@OcUfZZhUYCOlm# Date: Sat, 7 Feb 2026 14:13:00 +0800 Subject: [PATCH 3/3] QAQ --- .env | 2 +- .../components/TUIChat/message-list/index.vue | 24 +++++++++++-- .../message-list/message-tool/index.vue | 36 ++++++++++++------- api/index.js | 28 +++++++++++++-- composables/useAuthUser.js | 8 ++++- manifest.json | 2 +- .../LiveAudienceList/AudienceActionPanel.nvue | 33 ++++++++++++++++- 7 files changed, 112 insertions(+), 21 deletions(-) diff --git a/.env b/.env index 50796f8..01cbae4 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # API -# VITE_SYSTEM_URL = "http://s7d69cfc.natappfree.cc" +# VITE_SYSTEM_URL = "http://h69b336a.natappfree.cc" VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api" # 第三方客户 channelId diff --git a/TUIKit/components/TUIChat/message-list/index.vue b/TUIKit/components/TUIChat/message-list/index.vue index 125c7ea..7061fcf 100644 --- a/TUIKit/components/TUIChat/message-list/index.vue +++ b/TUIKit/components/TUIChat/message-list/index.vue @@ -173,6 +173,7 @@ 'message-tool-out': item.flow === 'out', 'message-tool-in': item.flow === 'in' }" + :role="userType" :messageItem="item" :isMultipleSelectMode="isMultipleSelectMode" @toggleMultipleSelectMode=" @@ -237,7 +238,8 @@ TUIStore, StoreName, TUITranslateService, - TUIChatService + TUIChatService, + TUIGroupService } from '@tencentcloud/chat-uikit-engine-lite' import { setInstanceMapping, @@ -287,6 +289,7 @@ import { navigateTo } from '../../../../utils/router' import { useUI } from '../../../../utils/use-ui' import { useUserStore } from '../../../../stores/user' + import { useAuthUser } from '../../../../composables/useAuthUser' interface IEmits { (e: 'closeInputToolBar'): void @@ -316,6 +319,9 @@ const isOfficial = TUIStore.getData(StoreName.APP, 'isOfficial') const thisInstance = getCurrentInstance()?.proxy || getCurrentInstance() + const { tencentUserSig } = useAuthUser() + /** 当前用户状态 */ + const userType = ref('') const messageList = ref() const multipleSelectedMessageIDList = ref([]) const isCompleted = ref(false) @@ -370,7 +376,7 @@ } } - onMounted(() => { + onMounted(async () => { // Retrieve the information about whether the audio has been played from localStorage audioPlayedMapping.value = chatStorage.getChatStorage('audioPlayedMapping') || {} @@ -388,6 +394,20 @@ setInstanceMapping('messageList', thisInstance) uni.$on('scroll-to-bottom', scrollToLatestMessage) + + /** + * isGroup: boolean + groupID: string + isNotInGroup: boolean + */ + + if (props.isGroup) { + const res = await TUIGroupService.getGroupMemberProfile({ + groupID: props.groupID, + userIDList: [tencentUserSig.value.userId] + }) + userType.value = res.data.memberList[0].role + } }) onUnmounted(() => { diff --git a/TUIKit/components/TUIChat/message-list/message-tool/index.vue b/TUIKit/components/TUIChat/message-list/message-tool/index.vue index 947b128..90a023b 100644 --- a/TUIKit/components/TUIChat/message-list/message-tool/index.vue +++ b/TUIKit/components/TUIChat/message-list/message-tool/index.vue @@ -30,7 +30,8 @@ TUIStore, StoreName, TUITranslateService, - IMessageModel + IMessageModel, + TUIGroupService } from '@tencentcloud/chat-uikit-engine-lite' import { TUIGlobal } from '@tencentcloud/universal-api' import { @@ -64,6 +65,7 @@ // #endif interface IProps { + role?: string messageItem: IMessageModel isMultipleSelectMode: boolean } @@ -75,8 +77,10 @@ const emits = defineEmits() const props = withDefaults(defineProps(), { isMultipleSelectMode: false, - messageItem: () => ({} as IMessageModel) + role: '', + messageItem: () => ({}) as IMessageModel }) + const featureConfig = TUIChatConfig.getFeatureConfig() const TYPES = TUIChatEngine.TYPES @@ -116,18 +120,10 @@ key: 'revoke', text: TUITranslateService.t('TUIChat.撤回'), iconUrl: revokeIcon, - renderCondition() { + renderCondition: () => { if (!featureConfig.RevokeMessage || !message.value) return false if (isRedEnvelopeMessage(message.value)) return false - - // console.log(message.value.conversationType === 'GROUP', '====') - console.log(message.value, '====') - // if (message.value.conversationType === 'GROUP') { - // TUIGroupService.getGroupAttributes({ - // groupID: 'group1', - // keyList: ['key1', 'key2'] - // }) - // } + if (isRevokeMessage(message.value)) return true return ( message.value.flow === 'out' && message.value.status === 'success' @@ -214,7 +210,7 @@ const message = ref() const messageToolDom = ref() - onMounted(() => { + onMounted(async () => { TUIStore.watch(StoreName.CHAT, { translateTextInfo: onMessageTranslationInfoUpdated, voiceToTextInfo: onMessageConvertInfoUpdated @@ -430,6 +426,20 @@ } } + /** 判断群聊时撤回状态 */ + const isRevokeMessage = (message: IMessageModel): boolean => { + if (message.conversationType === 'GROUP') { + if (props.role === 'Owner') { + return true + } + if (props.role === 'Admin') { + return true + } + return message.flow === 'out' && message.status === 'success' + } + return message.flow === 'out' && message.status === 'success' + } + function onMessageTranslationInfoUpdated( info: Map ) { diff --git a/api/index.js b/api/index.js index f016bb4..09559a6 100644 --- a/api/index.js +++ b/api/index.js @@ -138,7 +138,6 @@ export const getTencentUserSig = () => { }) } - /** 根据ip判断是否黑名单 */ export const getIpBlack = (loading = true) => { return http({ @@ -162,4 +161,29 @@ export const getRongYunLoginInfo = () => { url: '/api/user/usersig/ry', method: 'get' }) -} \ No newline at end of file +} + +/** 获取直播间禁言列表 */ +export const getUserBanList = roomId => { + return http({ + url: `/api/service/imLiveRoom/biddenMembers/${roomId} `, + method: 'get' + }) +} + +/** 获取直播间管理员列表 */ +export const getUserAdminList = roomId => { + return http({ + url: `/api/service/imLiveRoom/administrators/${roomId}`, + method: 'get' + }) +} + +/** 禁言直播间成员 */ +export const banUser = data => { + const { roomId, memberAccount, MuteTime } = data + return http({ + url: `/api/service/imLiveRoom/forbidMember/${roomId}/${memberAccount}/${MuteTime}`, + method: 'post' + }) +} diff --git a/composables/useAuthUser.js b/composables/useAuthUser.js index 38f7cfb..49421c1 100644 --- a/composables/useAuthUser.js +++ b/composables/useAuthUser.js @@ -10,7 +10,13 @@ export const useAuthUser = () => { const tokenStore = useTokenStore() // 响应式状态(state & getters) - const { imEngine, userInfo, tencentUserSig, fontSizeData, integralData } = storeToRefs(userStore) + const { + imEngine, + userInfo, + tencentUserSig, + fontSizeData, + integralData + } = storeToRefs(userStore) const { token } = storeToRefs(tokenStore) return { diff --git a/manifest.json b/manifest.json index 7acf74e..9e51b54 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "密谈IM", - "appid" : "__UNI__BE00EFC", + "appid" : "__UNI__D40A151", "description" : "", "versionName" : "1.1.3", "versionCode" : 112, diff --git a/uni_modules/tuikit-atomic-x/components/LiveAudienceList/AudienceActionPanel.nvue b/uni_modules/tuikit-atomic-x/components/LiveAudienceList/AudienceActionPanel.nvue index 09be220..cf3cd98 100644 --- a/uni_modules/tuikit-atomic-x/components/LiveAudienceList/AudienceActionPanel.nvue +++ b/uni_modules/tuikit-atomic-x/components/LiveAudienceList/AudienceActionPanel.nvue @@ -86,6 +86,10 @@ import { ref, computed } from 'vue' import { useLiveListState } from '@/uni_modules/tuikit-atomic-x/state/LiveListState' import { useLiveAudienceState } from '@/uni_modules/tuikit-atomic-x/state/LiveAudienceState' + import { useUI } from '../../../../utils/use-ui' + import { getUserBanList, getUserAdminList } from '../../../../api' + + const { showLoading, hideLoading } = useUI() const { currentLive } = useLiveListState() const { setAdministrator, @@ -124,6 +128,30 @@ emit('update:modelValue', false) } + /** 获取禁言列表 */ + const getBanList = async () => { + try { + showLoading() + const res = await getUserBanList(uni?.$liveID) + console.log('禁言列表=====', res) + hideLoading() + } catch (err) { + hideLoading() + } + } + + /** 获取管理员列表 */ + const getAdminList = async () => { + try { + showLoading() + const res = await getUserAdminList(uni?.$liveID) + console.log('管理列表=====', res) + hideLoading() + } catch (err) { + hideLoading() + } + } + /** 设置为管理员 */ const onDdmini = () => { console.log('====', userData.value) @@ -159,8 +187,10 @@ const muteSpeak = () => { console.log( - `mute or unMute speak, liveID: ${props.liveID}, isMessageDisabled: ${props?.userInfo?.isMessageDisabled}` + `${uni?.$liveID} === mute or unMute speak, liveID: ${props.liveID}, isMessageDisabled: ${props?.userInfo?.isMessageDisabled}` ) + getBanList() + const isShow = props?.userInfo?.isMessageDisabled uni.showModal({ title: `提示`, @@ -219,6 +249,7 @@ icon: 'success' }) } +