diff --git a/TUIKit/components/TUIChat/message-input/index.vue b/TUIKit/components/TUIChat/message-input/index.vue index 2f8b924..4a5a56f 100644 --- a/TUIKit/components/TUIChat/message-input/index.vue +++ b/TUIKit/components/TUIChat/message-input/index.vue @@ -83,6 +83,7 @@ import TUIChatConfig from '../config' import { useAuthUser } from '../../../../composables/useAuthUser' import { useUI } from '../../../../utils/use-ui' + import { getGroupBanList } from '../../../../api' interface IProps { placeholder: string @@ -171,15 +172,23 @@ const getMuteTime = async (displayType: ToolbarDisplayType) => { TUIGroupService.getGroupProfile({ groupID: props.groupID - }).then(res => { + }).then(async res => { // muteAllMembers - console.log(res.data.group.muteAllMembers) if (res.data.group.muteAllMembers) { // 禁言了 showDialog('提示', '当前群组已全员禁言', false) } else { // emits('changeToolbarDisplayType', displayType) // 判断某个成员是不是禁言 + const list = await getGroupBanList(props.groupID) + const show = list.data.MutedAccountList.find( + (v: any) => v.Member_Account === tencentUserSig.value.userId + ) + if (show?.Member_Account) { + showDialog('提示', '你被禁言了', false) + } else { + emits('changeToolbarDisplayType', displayType) + } } }) } diff --git a/TUIKit/components/TUIChat/utils/sendMessage.ts b/TUIKit/components/TUIChat/utils/sendMessage.ts index 61a09ff..c51c8b9 100644 --- a/TUIKit/components/TUIChat/utils/sendMessage.ts +++ b/TUIKit/components/TUIChat/utils/sendMessage.ts @@ -16,6 +16,7 @@ import OfflinePushInfoManager, { } from '../offlinePushInfoManager/index' import { useAuthUser } from '../../../../composables/useAuthUser' import { useUI } from '../../../../utils/use-ui' +import { getGroupBanList } from '../../../../api' export const sendMessageErrorCodeMap: Map = new Map([ [3123, '文本包含本地审核拦截词'], @@ -130,6 +131,21 @@ export const sendMessages = async ( showDialog('提示', '当前群组已全员禁言', false) } else { // 判断某个成员是不是禁言 + const list = await getGroupBanList( + currentConversation?.groupProfile?.groupID + ) + const show = list.data.MutedAccountList.find( + (v: any) => + v.Member_Account === tencentUserSig.value.userId + ) + if (show?.Member_Account) { + showDialog('提示', '你被禁言了', false) + } else { + await TUIChatService.sendTextMessage( + options, + sendMessageOptions + ) + } } } else { await TUIChatService.sendTextMessage( diff --git a/api/index.js b/api/index.js index 09559a6..8e45579 100644 --- a/api/index.js +++ b/api/index.js @@ -187,3 +187,11 @@ export const banUser = data => { method: 'post' }) } + +/** 群禁言列表 */ +export const getGroupBanList = id => { + return http({ + url: `/api/service/imGroup/muted/account/${id}`, + method: 'get' + }) +} \ No newline at end of file diff --git a/manifest.json b/manifest.json index 780dc4a..9800d87 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "密谈IM", "appid" : "__UNI__D40A151", "description" : "", - "versionName" : "1.1.5", - "versionCode" : 114, + "versionName" : "1.1.6", + "versionCode" : 115, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages.json b/pages.json index eaec770..0715240 100644 --- a/pages.json +++ b/pages.json @@ -506,6 +506,13 @@ "navigationBarTitleText": "记录详情", "navigationBarBackgroundColor": "#ffffff" } + }, + { + "path": "pages/discover/livelist/list", + "style": { + "navigationBarTitleText": "直播列表", + "navigationBarBackgroundColor": "#ffffff" + } } ], "globalStyle": { diff --git a/pages/discover/discover.vue b/pages/discover/discover.vue index 42b9275..f5b067d 100644 --- a/pages/discover/discover.vue +++ b/pages/discover/discover.vue @@ -2,7 +2,6 @@ import { navigateTo } from '@/utils/router' import { ref } from 'vue' import { useUI } from '@/utils/use-ui' - import { getLiveRoomList } from '../../api/tui-kit' const { showDialog } = useUI() @@ -52,22 +51,7 @@ return } if (item === 'liveStream') { - getLiveRoomList({ - pageNum: 1, - pageSize: 15 - }) - - return - let url = '' - // #ifdef APP-PLUS - url = '/pages/discover/livelist/index' - // #endif - - // #ifdef H5 - url = '/pages/discover/livelist/h5-list' - // #endif - navigateTo(url) - return + navigateTo('/pages/discover/livelist/list') } } diff --git a/pages/discover/livelist/list.vue b/pages/discover/livelist/list.vue new file mode 100644 index 0000000..6f061d7 --- /dev/null +++ b/pages/discover/livelist/list.vue @@ -0,0 +1,113 @@ + + + + +