var p=Object.defineProperty;var o=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var a=(t,e,s)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,r=(t,e)=>{for(var s in e||(e={}))h.call(e,s)&&a(t,s,e[s]);if(o)for(var s of o(e))m.call(e,s)&&a(t,s,e[s]);return t};import{C as f}from"./index.e66cb6b0.js";import{S as n}from"./index.f4e1cfd8.js";import{U as b}from"./index.b5a9ab3d.js";import{U as g}from"./index.8ffe9926.js";import{d as v,a as i,G as L,H as d,x as y,w as j}from"./vendor.a0144ce9.js";/* empty css               *//* empty css               *//* empty css               *//* empty css               */import{r as l,s as U,C as x}from"./index.3d95a92c.js";/* empty css               *//* empty css               */import"./bars.4f1962a6.js";/* empty css              *//* empty css                */import"./icon_teacher.40b6f077.js";import"./icon_timer2.563d016a.js";import"./icon_student.bbb32387.js";const I="_introduction_l0c9q_1";var u={"video-detail":"_video-detail_l0c9q_1",introduction:I};function c(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!y(t)}var W=v({name:"VideoDetail",data(){const t=this.$route.query;return{userInfo:{},detailList:[],buyUserList:[],dataShow:!0,loading:!1,finished:!1,params:{videoLessonGroupId:t.groupId,page:1,rows:20}}},async mounted(){try{const e=(await l.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:this.params.videoLessonGroupId}})).data||{},s=U.user.data||{};this.userInfo={username:s.username||`\u6E38\u5BA2${s.id||""}`,headUrl:s.heardUrl,buyNum:e.lessonGroup.countStudent,lessonNum:e.lessonGroup.lessonCount,lessonName:e.lessonGroup.lessonName,lessonDesc:e.lessonGroup.lessonDesc,lessonPrice:e.lessonGroup.lessonPrice,lessonCoverUrl:e.lessonGroup.lessonCoverUrl},this.detailList=e.detailList||[],this.getList()}catch{}},methods:{async getList(){try{let t=this.params;const e=await l.post("/api-teacher/videoLesson/pageStudent",{data:r({},t)});this.loading=!1;const s=e.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(t){this.$router.push({path:"/videoClassDetail",query:{groupId:this.params.videoLessonGroupId,classId:t.id}})}},render(){let t,e;return i("div",{class:[u["video-detail"],"mb12"]},[i(b,{userInfo:this.userInfo},null),i(n,null,{default:()=>[i("p",{class:u.introduction},[this.userInfo.lessonDesc])]}),i(n,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",titleShow:!1,contentStyle:{paddingTop:"0"}},{default:()=>[i(L,{color:"var(--van-primary)",lineWidth:20,sticky:!0},{default:()=>[i(d,{title:"\u8BFE\u7A0B",titleClass:"van-hairline--bottom"},c(t=this.detailList.map(s=>i(f,{class:"mb12",detail:{id:s.id,title:s.videoTitle,content:s.videoContent,imgUrl:s.coverUrl},onPlay:this.onPlay},null)))?t:{default:()=>[t]}),i(d,{title:"\u5B66\u5458\u5217\u8868",titleClass:"van-hairline--bottom"},{default:()=>[this.dataShow?i(j,{loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},c(e=this.buyUserList.map(s=>i(g,{class:"mb12",users:{avatar:s.avatar,studentId:s.userId,studentName:s.username,createTime:s.createTime}},null)))?e:{default:()=>[e]}):i(x,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5B66\u751F\u8D2D\u4E70"},null)]})]})]})])}});export{W as default};
