1 |
- var c=Object.defineProperty;var r=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var i=(e,t,s)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,n=(e,t)=>{for(var s in t||(t={}))p.call(t,s)&&i(e,s,t[s]);if(r)for(var s of r(t))m.call(t,s)&&i(e,s,t[s]);return e};import{C as f}from"./index.34e13dc3.js";import{S as d}from"./index.93b8dae9.js";import{U as I}from"./index.426f79cf.js";import{U as b}from"./index.854fdfea.js";import{d as j,a as o,G as v,H as l,x as g,w as y,B as L,j as S,P as C}from"./vendor.75c233d7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{r as u,s as U,C as x}from"./index.3d1a86cd.js";import{C as N}from"./index.753847c3.js";import{C as G}from"./index.f85989e5.js";import{L as _}from"./live-item.03dfd48e.js";/* empty css *//* empty css */import"./bars.4f1962a6.js";/* empty css *//* empty css */import"./icon_teacher.40b6f077.js";import"./icon_timer2.5fb1750d.js";import"./icon_student.bbb32387.js";import"./browser.ebb85846.js";const w="_introduction_1j1qj_1",P="_shareCourse_1j1qj_9";var a={"video-detail":"_video-detail_1j1qj_1",introduction:w,shareCourse:P};function h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!g(e)}var es=j({name:"VideoDetail",data(){const e=this.$route.query;return{userInfo:{},detailList:[],buyUserList:[],dataShow:!0,loading:!1,finished:!1,share:e.share,params:{videoLessonGroupId:e.groupId,page:1,rows:20},shareStatus:!1,shareUrl:""}},async mounted(){var e;try{const s=(await u.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:this.params.videoLessonGroupId}})).data||{};this.userInfo={id:s.lessonGroup.teacherId,username:s.lessonGroup.username,headUrl:s.lessonGroup.avatar,buyNum:s.lessonGroup.countStudent,lessonId:s.lessonGroup.id,lessonNum:s.lessonGroup.lessonCount,lessonName:s.lessonGroup.lessonName,lessonDesc:s.lessonGroup.lessonDesc,lessonPrice:s.lessonGroup.lessonPrice,lessonCoverUrl:s.lessonGroup.lessonCoverUrl,lessonSubjectName:s.lessonGroup.lessonSubjectName},this.detailList=s.detailList||[],this.shareUrl=`${location.origin}/teacher#/shareVideo?recomUserId=${(e=U.user.data)==null?void 0:e.userId}&groupId=${this.params.videoLessonGroupId}`,this.getList()}catch(t){console.log(t)}},methods:{async getList(){try{const e=this.params,t=await u.post("/api-teacher/videoLesson/pageStudent",{data:n({},e)});this.loading=!1;const s=t.data||{};if(this.buyUserList.length>0&&s.pageNo===1)return;this.buyUserList=this.buyUserList.concat(s.rows||[]),this.finished=s.pageNo>=s.totalPage,this.params.page=s.pageNo+1,this.dataShow=this.buyUserList.length>0}catch{this.dataShow=!1,this.finished=!0}},onPlay(e){this.$router.push({path:"/videoClassDetail",query:{groupId:this.params.videoLessonGroupId,classId:e.id}})}},render(){let e,t;return o("div",{class:[a["video-detail"],"mb12"]},[this.userInfo.id&&o(I,{userInfo:this.userInfo},null),o(d,{border:!0},{default:()=>[o("p",{class:a.introduction},[this.userInfo.lessonDesc])]}),o(d,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",titleShow:!1,contentStyle:{paddingTop:"0"}},{default:()=>[o(v,{color:"var(--van-primary)",lineWidth:20,sticky:!0},{default:()=>[o(l,{title:"\u8BFE\u7A0B",titleClass:"van-hairline--bottom"},h(e=this.detailList.map(s=>o(f,{class:"mb12",detail:{id:s.id,title:s.videoTitle,content:s.videoContent,imgUrl:s.coverUrl},onPlay:this.onPlay},null)))?e:{default:()=>[e]}),o(l,{title:"\u5B66\u5458\u5217\u8868",titleClass:"van-hairline--bottom"},{default:()=>[this.dataShow?o(y,{loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},h(t=this.buyUserList.map(s=>o(b,{class:"mb12",users:{avatar:s.avatar,studentId:s.userId,studentName:s.username,createTime:s.createTime}},null)))?t:{default:()=>[t]}):o(x,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5B66\u751F\u8D2D\u4E70"},null)]})]})]}),this.share=="1"&&this.detailList.length>0&&o(G,{position:"bottom"},{default:()=>[o("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[o(L,{block:!0,round:!0,type:"primary",onClick:()=>{this.shareStatus=!0}},{default:()=>[S("\u5206\u4EAB\u8BFE\u7A0B")]})])]}),o(C,{show:this.shareStatus,"onUpdate:show":s=>this.shareStatus=s,style:{background:"transparent"}},{default:()=>[o(N,{teacherId:this.userInfo.id,shareUrl:this.shareUrl},{default:()=>[o(_,{class:a.shareCourse,liveInfo:{backgroundPic:this.userInfo.lessonCoverUrl,courseGroupId:this.userInfo.lessonId,courseGroupName:this.userInfo.lessonName,courseNum:this.userInfo.lessonNum,coursePrice:this.userInfo.lessonPrice,teacherName:this.userInfo.username,teacherId:this.userInfo.id,avatar:this.userInfo.avatar,studentCount:this.userInfo.buyNum,existBuy:0,subjectName:this.userInfo.lessonSubjectName}},null)]})]})])}});export{es as default};
|