QAQ
This commit is contained in:
@@ -83,6 +83,7 @@
|
|||||||
import TUIChatConfig from '../config'
|
import TUIChatConfig from '../config'
|
||||||
import { useAuthUser } from '../../../../composables/useAuthUser'
|
import { useAuthUser } from '../../../../composables/useAuthUser'
|
||||||
import { useUI } from '../../../../utils/use-ui'
|
import { useUI } from '../../../../utils/use-ui'
|
||||||
|
import { getGroupBanList } from '../../../../api'
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
placeholder: string
|
placeholder: string
|
||||||
@@ -171,15 +172,23 @@
|
|||||||
const getMuteTime = async (displayType: ToolbarDisplayType) => {
|
const getMuteTime = async (displayType: ToolbarDisplayType) => {
|
||||||
TUIGroupService.getGroupProfile({
|
TUIGroupService.getGroupProfile({
|
||||||
groupID: props.groupID
|
groupID: props.groupID
|
||||||
}).then(res => {
|
}).then(async res => {
|
||||||
// muteAllMembers
|
// muteAllMembers
|
||||||
console.log(res.data.group.muteAllMembers)
|
|
||||||
if (res.data.group.muteAllMembers) {
|
if (res.data.group.muteAllMembers) {
|
||||||
// 禁言了
|
// 禁言了
|
||||||
showDialog('提示', '当前群组已全员禁言', false)
|
showDialog('提示', '当前群组已全员禁言', false)
|
||||||
} else {
|
} else {
|
||||||
// emits('changeToolbarDisplayType', displayType)
|
// 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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import OfflinePushInfoManager, {
|
|||||||
} from '../offlinePushInfoManager/index'
|
} from '../offlinePushInfoManager/index'
|
||||||
import { useAuthUser } from '../../../../composables/useAuthUser'
|
import { useAuthUser } from '../../../../composables/useAuthUser'
|
||||||
import { useUI } from '../../../../utils/use-ui'
|
import { useUI } from '../../../../utils/use-ui'
|
||||||
|
import { getGroupBanList } from '../../../../api'
|
||||||
|
|
||||||
export const sendMessageErrorCodeMap: Map<number, string> = new Map([
|
export const sendMessageErrorCodeMap: Map<number, string> = new Map([
|
||||||
[3123, '文本包含本地审核拦截词'],
|
[3123, '文本包含本地审核拦截词'],
|
||||||
@@ -130,6 +131,21 @@ export const sendMessages = async (
|
|||||||
showDialog('提示', '当前群组已全员禁言', false)
|
showDialog('提示', '当前群组已全员禁言', false)
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
await TUIChatService.sendTextMessage(
|
await TUIChatService.sendTextMessage(
|
||||||
|
|||||||
@@ -187,3 +187,11 @@ export const banUser = data => {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 群禁言列表 */
|
||||||
|
export const getGroupBanList = id => {
|
||||||
|
return http({
|
||||||
|
url: `/api/service/imGroup/muted/account/${id}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
"name" : "密谈IM",
|
"name" : "密谈IM",
|
||||||
"appid" : "__UNI__D40A151",
|
"appid" : "__UNI__D40A151",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.1.5",
|
"versionName" : "1.1.6",
|
||||||
"versionCode" : 114,
|
"versionCode" : 115,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@@ -506,6 +506,13 @@
|
|||||||
"navigationBarTitleText": "记录详情",
|
"navigationBarTitleText": "记录详情",
|
||||||
"navigationBarBackgroundColor": "#ffffff"
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/discover/livelist/list",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "直播列表",
|
||||||
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
import { navigateTo } from '@/utils/router'
|
import { navigateTo } from '@/utils/router'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useUI } from '@/utils/use-ui'
|
import { useUI } from '@/utils/use-ui'
|
||||||
import { getLiveRoomList } from '../../api/tui-kit'
|
|
||||||
|
|
||||||
const { showDialog } = useUI()
|
const { showDialog } = useUI()
|
||||||
|
|
||||||
@@ -52,22 +51,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (item === 'liveStream') {
|
if (item === 'liveStream') {
|
||||||
getLiveRoomList({
|
navigateTo('/pages/discover/livelist/list')
|
||||||
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
113
pages/discover/livelist/list.vue
Normal file
113
pages/discover/livelist/list.vue
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<script setup>
|
||||||
|
import { navigateTo } from '@/utils/router'
|
||||||
|
import { getLiveRoomList } from '../../../api/tui-kit'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
const list = ref([])
|
||||||
|
const paging = ref(null)
|
||||||
|
const getList = async (pageNum, pageSize) => {
|
||||||
|
try {
|
||||||
|
const res = await getLiveRoomList({
|
||||||
|
pageNum,
|
||||||
|
pageSize
|
||||||
|
})
|
||||||
|
paging.value.complete(res.rows)
|
||||||
|
} catch (error) {
|
||||||
|
paging.value.complete(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const onGo = item => {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
uni.$liveID = item.roomId
|
||||||
|
navigateTo('/pages/audience/index', { liveID: item.roomId })
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
|
navigateTo('/pages/discover/livelist/h5-live-player', {
|
||||||
|
liveId: item.roomId
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<z-paging
|
||||||
|
ref="paging"
|
||||||
|
v-model="list"
|
||||||
|
:default-page-no="1"
|
||||||
|
:default-page-size="15"
|
||||||
|
safe-area-inset-bottom
|
||||||
|
use-safe-area-placeholder
|
||||||
|
:paging-style="{ 'background-color': '#f9f9f9' }"
|
||||||
|
@query="getList"
|
||||||
|
>
|
||||||
|
<view class="list-box">
|
||||||
|
<view
|
||||||
|
v-for="item in list"
|
||||||
|
:key="item.roomId"
|
||||||
|
class="live-box"
|
||||||
|
@click="onGo(item)"
|
||||||
|
>
|
||||||
|
<!-- 背景图 -->
|
||||||
|
<image
|
||||||
|
:src="item.coverUrl"
|
||||||
|
lazy-load
|
||||||
|
mode="aspectFill"
|
||||||
|
class="bg-box"
|
||||||
|
/>
|
||||||
|
<view class="title-box">
|
||||||
|
<view class="title-text">
|
||||||
|
<text>
|
||||||
|
{{ item.roomName }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</z-paging>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.list-box {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
|
||||||
|
.live-box {
|
||||||
|
width: 48%;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
height: 420rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
.bg-box {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.title-box {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 16rpx 0;
|
||||||
|
background: rgba(88, 88, 88, 0.164);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.title-text {
|
||||||
|
color: #fff;
|
||||||
|
padding: 0 10rpx 0 14rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
text {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1; /* 显示3行 */
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user