Merge remote-tracking branch 'origin/master' into test-audio
This commit is contained in:
2
.env
2
.env
@@ -1,5 +1,5 @@
|
|||||||
# API
|
# API
|
||||||
# VITE_SYSTEM_URL = "http://s7d69cfc.natappfree.cc"
|
# VITE_SYSTEM_URL = "http://h69b336a.natappfree.cc"
|
||||||
VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api"
|
VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api"
|
||||||
|
|
||||||
# 第三方客户 channelId
|
# 第三方客户 channelId
|
||||||
|
|||||||
@@ -26,4 +26,8 @@ unaipp多端im+会议+积分商城
|
|||||||
```https://cloud.tencent.com/document/product/647/111859```
|
```https://cloud.tencent.com/document/product/647/111859```
|
||||||
|
|
||||||
### 聊天列表
|
### 聊天列表
|
||||||
```https://cloud.tencent.com/document/product/269/105582```
|
```https://cloud.tencent.com/document/product/269/105582```
|
||||||
|
|
||||||
|
|
||||||
|
### 文档地址
|
||||||
|
```https://dev.cqjcteach.cn/prod-api/doc.html#/home```
|
||||||
@@ -173,6 +173,7 @@
|
|||||||
'message-tool-out': item.flow === 'out',
|
'message-tool-out': item.flow === 'out',
|
||||||
'message-tool-in': item.flow === 'in'
|
'message-tool-in': item.flow === 'in'
|
||||||
}"
|
}"
|
||||||
|
:role="userType"
|
||||||
:messageItem="item"
|
:messageItem="item"
|
||||||
:isMultipleSelectMode="isMultipleSelectMode"
|
:isMultipleSelectMode="isMultipleSelectMode"
|
||||||
@toggleMultipleSelectMode="
|
@toggleMultipleSelectMode="
|
||||||
@@ -237,7 +238,8 @@
|
|||||||
TUIStore,
|
TUIStore,
|
||||||
StoreName,
|
StoreName,
|
||||||
TUITranslateService,
|
TUITranslateService,
|
||||||
TUIChatService
|
TUIChatService,
|
||||||
|
TUIGroupService
|
||||||
} from '@tencentcloud/chat-uikit-engine-lite'
|
} from '@tencentcloud/chat-uikit-engine-lite'
|
||||||
import {
|
import {
|
||||||
setInstanceMapping,
|
setInstanceMapping,
|
||||||
@@ -287,6 +289,7 @@
|
|||||||
import { navigateTo } from '../../../../utils/router'
|
import { navigateTo } from '../../../../utils/router'
|
||||||
import { useUI } from '../../../../utils/use-ui'
|
import { useUI } from '../../../../utils/use-ui'
|
||||||
import { useUserStore } from '../../../../stores/user'
|
import { useUserStore } from '../../../../stores/user'
|
||||||
|
import { useAuthUser } from '../../../../composables/useAuthUser'
|
||||||
|
|
||||||
interface IEmits {
|
interface IEmits {
|
||||||
(e: 'closeInputToolBar'): void
|
(e: 'closeInputToolBar'): void
|
||||||
@@ -316,6 +319,9 @@
|
|||||||
const isOfficial = TUIStore.getData(StoreName.APP, 'isOfficial')
|
const isOfficial = TUIStore.getData(StoreName.APP, 'isOfficial')
|
||||||
const thisInstance = getCurrentInstance()?.proxy || getCurrentInstance()
|
const thisInstance = getCurrentInstance()?.proxy || getCurrentInstance()
|
||||||
|
|
||||||
|
const { tencentUserSig } = useAuthUser()
|
||||||
|
/** 当前用户状态 */
|
||||||
|
const userType = ref('')
|
||||||
const messageList = ref<IMessageModel[]>()
|
const messageList = ref<IMessageModel[]>()
|
||||||
const multipleSelectedMessageIDList = ref<string[]>([])
|
const multipleSelectedMessageIDList = ref<string[]>([])
|
||||||
const isCompleted = ref(false)
|
const isCompleted = ref(false)
|
||||||
@@ -370,7 +376,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
// Retrieve the information about whether the audio has been played from localStorage
|
// Retrieve the information about whether the audio has been played from localStorage
|
||||||
audioPlayedMapping.value =
|
audioPlayedMapping.value =
|
||||||
chatStorage.getChatStorage('audioPlayedMapping') || {}
|
chatStorage.getChatStorage('audioPlayedMapping') || {}
|
||||||
@@ -388,6 +394,20 @@
|
|||||||
setInstanceMapping('messageList', thisInstance)
|
setInstanceMapping('messageList', thisInstance)
|
||||||
|
|
||||||
uni.$on('scroll-to-bottom', scrollToLatestMessage)
|
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(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
TUIStore,
|
TUIStore,
|
||||||
StoreName,
|
StoreName,
|
||||||
TUITranslateService,
|
TUITranslateService,
|
||||||
IMessageModel
|
IMessageModel,
|
||||||
|
TUIGroupService
|
||||||
} from '@tencentcloud/chat-uikit-engine-lite'
|
} from '@tencentcloud/chat-uikit-engine-lite'
|
||||||
import { TUIGlobal } from '@tencentcloud/universal-api'
|
import { TUIGlobal } from '@tencentcloud/universal-api'
|
||||||
import {
|
import {
|
||||||
@@ -64,6 +65,7 @@
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
role?: string
|
||||||
messageItem: IMessageModel
|
messageItem: IMessageModel
|
||||||
isMultipleSelectMode: boolean
|
isMultipleSelectMode: boolean
|
||||||
}
|
}
|
||||||
@@ -75,8 +77,10 @@
|
|||||||
const emits = defineEmits<IEmits>()
|
const emits = defineEmits<IEmits>()
|
||||||
const props = withDefaults(defineProps<IProps>(), {
|
const props = withDefaults(defineProps<IProps>(), {
|
||||||
isMultipleSelectMode: false,
|
isMultipleSelectMode: false,
|
||||||
messageItem: () => ({} as IMessageModel)
|
role: '',
|
||||||
|
messageItem: () => ({}) as IMessageModel
|
||||||
})
|
})
|
||||||
|
|
||||||
const featureConfig = TUIChatConfig.getFeatureConfig()
|
const featureConfig = TUIChatConfig.getFeatureConfig()
|
||||||
|
|
||||||
const TYPES = TUIChatEngine.TYPES
|
const TYPES = TUIChatEngine.TYPES
|
||||||
@@ -116,18 +120,10 @@
|
|||||||
key: 'revoke',
|
key: 'revoke',
|
||||||
text: TUITranslateService.t('TUIChat.撤回'),
|
text: TUITranslateService.t('TUIChat.撤回'),
|
||||||
iconUrl: revokeIcon,
|
iconUrl: revokeIcon,
|
||||||
renderCondition() {
|
renderCondition: () => {
|
||||||
if (!featureConfig.RevokeMessage || !message.value) return false
|
if (!featureConfig.RevokeMessage || !message.value) return false
|
||||||
if (isRedEnvelopeMessage(message.value)) return false
|
if (isRedEnvelopeMessage(message.value)) return false
|
||||||
|
if (isRevokeMessage(message.value)) return true
|
||||||
// console.log(message.value.conversationType === 'GROUP', '====')
|
|
||||||
console.log(message.value, '====')
|
|
||||||
// if (message.value.conversationType === 'GROUP') {
|
|
||||||
// TUIGroupService.getGroupAttributes({
|
|
||||||
// groupID: 'group1',
|
|
||||||
// keyList: ['key1', 'key2']
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
return (
|
return (
|
||||||
message.value.flow === 'out' &&
|
message.value.flow === 'out' &&
|
||||||
message.value.status === 'success'
|
message.value.status === 'success'
|
||||||
@@ -214,7 +210,7 @@
|
|||||||
const message = ref<IMessageModel>()
|
const message = ref<IMessageModel>()
|
||||||
const messageToolDom = ref<HTMLElement>()
|
const messageToolDom = ref<HTMLElement>()
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
TUIStore.watch(StoreName.CHAT, {
|
TUIStore.watch(StoreName.CHAT, {
|
||||||
translateTextInfo: onMessageTranslationInfoUpdated,
|
translateTextInfo: onMessageTranslationInfoUpdated,
|
||||||
voiceToTextInfo: onMessageConvertInfoUpdated
|
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(
|
function onMessageTranslationInfoUpdated(
|
||||||
info: Map<string, ITranslateInfo[]>
|
info: Map<string, ITranslateInfo[]>
|
||||||
) {
|
) {
|
||||||
|
|||||||
28
api/index.js
28
api/index.js
@@ -138,7 +138,6 @@ export const getTencentUserSig = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** 根据ip判断是否黑名单 */
|
/** 根据ip判断是否黑名单 */
|
||||||
export const getIpBlack = (loading = true) => {
|
export const getIpBlack = (loading = true) => {
|
||||||
return http({
|
return http({
|
||||||
@@ -162,4 +161,29 @@ export const getRongYunLoginInfo = () => {
|
|||||||
url: '/api/user/usersig/ry',
|
url: '/api/user/usersig/ry',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 获取直播间禁言列表 */
|
||||||
|
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'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,7 +10,13 @@ export const useAuthUser = () => {
|
|||||||
const tokenStore = useTokenStore()
|
const tokenStore = useTokenStore()
|
||||||
|
|
||||||
// 响应式状态(state & getters)
|
// 响应式状态(state & getters)
|
||||||
const { imEngine, userInfo, tencentUserSig, fontSizeData, integralData } = storeToRefs(userStore)
|
const {
|
||||||
|
imEngine,
|
||||||
|
userInfo,
|
||||||
|
tencentUserSig,
|
||||||
|
fontSizeData,
|
||||||
|
integralData
|
||||||
|
} = storeToRefs(userStore)
|
||||||
const { token } = storeToRefs(tokenStore)
|
const { token } = storeToRefs(tokenStore)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "密谈IM",
|
"name" : "密谈IM",
|
||||||
"appid" : "__UNI__BE00EFC",
|
"appid" : "__UNI__D40A151",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.1.3",
|
"versionName" : "1.1.3",
|
||||||
"versionCode" : 112,
|
"versionCode" : 112,
|
||||||
|
|||||||
@@ -340,7 +340,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/shop-together/index",
|
"path": "pages/shop-together/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "购买记录"
|
"navigationBarTitleText": "拼团"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
{ 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: 'shopping' },
|
||||||
{ name: '项目入口', icon: 'project' },
|
{ name: '项目入口', icon: 'project' },
|
||||||
{ name: '直播列表', icon: 'liveStream' }
|
{ name: '直播列表', icon: 'liveStream' }
|
||||||
]
|
]
|
||||||
|
|||||||
BIN
static/images/discover/shopping.png
Normal file
BIN
static/images/discover/shopping.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -86,6 +86,10 @@
|
|||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { useLiveListState } from '@/uni_modules/tuikit-atomic-x/state/LiveListState'
|
import { useLiveListState } from '@/uni_modules/tuikit-atomic-x/state/LiveListState'
|
||||||
import { useLiveAudienceState } from '@/uni_modules/tuikit-atomic-x/state/LiveAudienceState'
|
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 { currentLive } = useLiveListState()
|
||||||
const {
|
const {
|
||||||
setAdministrator,
|
setAdministrator,
|
||||||
@@ -124,6 +128,30 @@
|
|||||||
emit('update:modelValue', false)
|
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 = () => {
|
const onDdmini = () => {
|
||||||
console.log('====', userData.value)
|
console.log('====', userData.value)
|
||||||
@@ -159,8 +187,10 @@
|
|||||||
|
|
||||||
const muteSpeak = () => {
|
const muteSpeak = () => {
|
||||||
console.log(
|
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
|
const isShow = props?.userInfo?.isMessageDisabled
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: `提示`,
|
title: `提示`,
|
||||||
@@ -219,6 +249,7 @@
|
|||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in New Issue
Block a user