import { ElButton, ElImage } from 'element-plus' import { defineComponent } from 'vue' import iconTeacher from '@/common/images/icon_teacher.png' export default defineComponent({ name: 'item', props: { item: { type: Object, default: () => ({}) }, onOffCourse: { type: Function, default: (item: any) => {} } }, render() { const item = this.item return (
{ // console.log(item) if (item.type === 'video') { if ( item.shelvesFlag === 0 && (item.status === 'UNPASS' || item.status === 'OUT_SALE') ) { this.$router.push({ path: '/userInfo/videoOperation', query: { type: 'edit', groupId: item.id } }) return } else { this.$router.push({ path: '/videoDetail', query: { id: item.id } }) } } if ( item.type === 'live' && (item.status === 'CANCEL' || item.status === 'OUT_SALE') ) { // 直播课 this.$router.push({ path: '/userInfo/liveOperation', query: { type: 'edit', groupId: item.courseGroupId } }) } }} > {/* {item.subjectName && (
{item.subjectName}
)} */}
{item.courseNum}课时
{item.studentCount}人已学习
{item.courseGroupName}
{item.courseStartTime && (

开课时间:{item.courseStartTime}

)}
{item.payType === 'VIP' ? (
会员
) : (
{item.coursePrice}
)} {item.type === 'video' && item.status === 'PASS' && (
{ e.stopPropagation() this.onOffCourse(item) }} > 下架课程
)}
) } })