需要添加视频直播测试

This commit is contained in:
cbb
2026-01-09 17:46:57 +08:00
parent 2e5a72c25e
commit 83fec2617c
5 changed files with 191 additions and 47 deletions

View File

@@ -1,10 +1,19 @@
<script setup></script>
<script setup>
import realId from '../../../../../pages/my-index/wallet/real-id'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from '../../../../adapter-vue'
const stateData = ref(0)
onLoad(e => {
stateData.value = Number(e?.type)
})
</script>
<template>
<view>
<nav-bar isTopBg isPlaceholder title="申请主播"></nav-bar>
申请直播TUIKit\components\TUIChat\message-input-toolbar\live-stream\apply.vue
<view class="apply-box"></view>
<realId v-model="stateData" isLiveStream></realId>
</view>
</template>

View File

@@ -4,15 +4,43 @@
import ToolbarItemContainer from '../toolbar-item-container/index.vue'
import { isUniFrameWork } from '../../../../utils/env'
import { navigateTo } from '../../../../../utils/router'
import { getAnchorDetail } from '../../../../../api/tui-kit'
import { useUI } from '../../../../../utils/use-ui'
const { showDialog } = useUI()
const evaluateIcon = custom
const container = ref()
const onDialogShow = () => {
navigateTo(
'/TUIKit/components/TUIChat/message-input-toolbar/live-stream/apply'
)
/**
* 主播申请状态
* 0 待审核 1 审核通过 2 审核拒绝 3 已封禁 9 新增
*/
const stateData = ref(0)
const onDialogShow = async () => {
const res = await getAnchorDetail()
if (res?.data) {
stateData.value = res.data.status
} else {
stateData.value = 9
}
container?.value?.toggleDialogDisplay(false)
if ([0, 2, 9].includes(stateData.value)) {
navigateTo(
'/TUIKit/components/TUIChat/message-input-toolbar/live-stream/apply',
{ type: stateData.value }
)
return
}
if (stateData.value === 1) {
console.log('去直播间')
return
}
if (stateData.value === 3) {
showDialog('提示', '您已被封禁,请联系管理员解封', false)
return
}
}
</script>