var p=Object.defineProperty;var o=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var a=(e,s,t)=>s in e?p(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,r=(e,s)=>{for(var t in s||(s={}))h.call(s,t)&&a(e,t,s[t]);if(o)for(var t of o(s))m.call(s,t)&&a(e,t,s[t]);return e};import{U as f,C as b}from"./index.7de7a51d.js";import{S as n}from"./index.711b6663.js";import{U as g}from"./index.e366bbbe.js";import{d as y,b as i,Y as L,Z as l,w as v,X as j}from"./vendor.14dbc21a.js";/* empty css *//* empty css *//* empty css *//* empty css */import{r as d,s as U}from"./main.abf8ca27.js";import{C as x}from"./index.022a3a6b.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./icon_teacher.d1cfb2e9.js";const I="_introduction_l0c9q_1";var u={"video-detail":"_video-detail_l0c9q_1",introduction:I};function c(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!v(e)}var X=y({name:"VideoDetail",data(){console.log(this.$route.query.groupId);const e=this.$route.query;return{userInfo:{},detailList:[],buyUserList:[],dataShow:!0,loading:!1,finished:!1,params:{groupId:e.groupId,page:1,rows:20}}},async mounted(){try{const s=(await d.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:this.params.groupId}})).data||{},t=U.user.data||{};this.userInfo={username:t.username,headUrl:t.headUrl,buyNum:0,lessonName:s.lessonGroup.lessonName,lessonDesc:s.lessonGroup.lessonDesc,lessonPrice:s.lessonGroup.lessonPrice,lessonCoverUrl:s.lessonGroup.lessonCoverUrl},this.detailList=s.detailList||[],this.getList()}catch{}},methods:{async getList(){try{let e=this.params;const t=(await d.post("/api-teacher/videoLesson/pageStudent",{data:r({},e)})).data||{};if(this.buyUserList.length>0&&t.pageNo===1)return;this.buyUserList=this.buyUserList.concat(t.list||[]),this.finished=t.pageNo>=t.totalPage,this.params=t.pageNo+1,this.dataShow=this.buyUserList.length>0,this.userInfo.buyNum=t.totalCount||0}catch{}},onPlay(e){console.log(e)}},render(){let e,s;return i("div",{class:[u["video-detail"],"mb12"]},[i(f,{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(l,{title:"\u8BFE\u7A0B",titleClass:"van-hairline--bottom"},c(e=this.detailList.map(t=>i(b,{class:"mb12",detail:{id:t.id,title:t.videoTitle,content:t.videoContent,imgUrl:t.coverUrl},onPlay:this.onPlay},null)))?e:{default:()=>[e]}),i(l,{title:"\u5B66\u5458\u5217\u8868",titleClass:"van-hairline--bottom"},{default:()=>[this.dataShow?i(j,{loading:this.loading,"onUpdate:loading":t=>this.loading=t,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},c(s=this.buyUserList.map(t=>i(g,{class:"mb12"},null)))?s:{default:()=>[s]}):i(x,{btnStatus:!1,tips:"\u6682\u65E0\u5B66\u751F\u8D2D\u4E70"},null)]})]})]})])}});export{X as default};