import SectionDetail from '@/business-components/section-detail' import ColVideo from '@/components/col-video' import request from '@/helpers/request' import { Button, Cell, Icon, Image, Popup } from 'vant' import { defineComponent } from 'vue' import styles from './single.module.less' import { postMessage } from '@/helpers/native-message' import JoinChat from '../model/join-chat' import iconUploadPoster from '@common/images/icon_upload_poster.png' export const getAssetsHomeFile = (fileName: string) => { const path = `../images/${fileName}` const modules = import.meta.globEager('../images/*') return modules[path].default } export default defineComponent({ name: 'single', props: { userInfo: { type: Object, default: {} } }, data() { const query = this.$route.query return { videoStatus: false, chatStatus: false, teacherId: query.teacherId, fansList: [], chatItem: {}, videoItem: {} } }, async mounted() { try { const res = await request.post('/api-student/imGroup/queryTeacherGroup', { data: { type: 'FAN', createUserId: this.teacherId } }) this.fansList = res.data || [] } catch {} }, methods: { async onDetail(item: any) { // 申请入群 if (!item.hasWaitAuditFlag && !item.existFlag) { this.chatStatus = true this.chatItem = item return } // 进入群聊天 if (item.existFlag) { postMessage({ api: 'joinChatGroup', content: { type: 'multi', // single 单人 multi 多人 id: item.id } }) } } }, render() { const userInfo = this.userInfo return (
{userInfo.introduction}
{item.introduce}