video-detail.e5cbaeb2.js 5.3 KB

1
  1. var f=Object.defineProperty;var l=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var d=(e,o,s)=>o in e?f(e,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[o]=s,u=(e,o)=>{for(var s in o||(o={}))b.call(o,s)&&d(e,s,o[s]);if(l)for(var s of l(o))v.call(o,s)&&d(e,s,o[s]);return e};import{C as h}from"./index.845eb2d1.js";import{S as a}from"./index.4b159732.js";import{U as I}from"./index.07b072c5.js";import{U as y}from"./index.bcf22891.js";import{d as g,a as t,x as L,G as j,H as c,w as C,B as U,j as S,P as x}from"./vendor.7fdfd452.js";/* empty css *//* empty css *//* empty css *//* empty css */import{r as p,s as m,C as N}from"./index.c610da41.js";import{C as G}from"./index.889d53bb.js";import{C as _}from"./index.5fcd7421.js";import{L as w}from"./live-item.e4a55a27.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 P="_introduction_1ll29_1",T="_shareCourse_1ll29_9",D="_coverClass_1ll29_17";var r={"video-detail":"_video-detail_1ll29_1",introduction:P,shareCourse:T,coverClass:D};function n(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!L(e)}var os=g({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:"",myself:!1}},async mounted(){var e;try{const s=(await p.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:this.params.videoLessonGroupId}})).data||{};m.platformType==="TEACHER"&&(this.myself=!s.myself),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=m.user.data)==null?void 0:e.userId}&groupId=${this.params.videoLessonGroupId}`,this.getList()}catch(o){console.log(o)}},methods:{async getList(){try{const e=this.params,o=await p.post("/api-teacher/videoLesson/pageStudent",{data:u({},e)});this.loading=!1;const s=o.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,o,s;return t("div",{class:[r["video-detail"],"mb12"]},[this.userInfo.id&&t(I,{userInfo:this.userInfo},null),t(a,{border:!0},{default:()=>[t("p",{class:r.introduction},[this.userInfo.lessonDesc])]}),this.myself?t(a,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",border:!0},n(e=this.detailList.map(i=>t(h,{class:"mb12",detail:{id:i.id,title:i.videoTitle,content:i.videoContent,imgUrl:i.coverUrl},onPlay:this.onPlay},null)))?e:{default:()=>[e]}):t(a,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",titleShow:!1,contentStyle:{paddingTop:"0"}},{default:()=>[t(j,{color:"var(--van-primary)",lineWidth:20,sticky:!0},{default:()=>[t(c,{title:"\u8BFE\u7A0B",titleClass:"van-hairline--bottom"},n(o=this.detailList.map(i=>t(h,{class:"mb12",detail:{id:i.id,title:i.videoTitle,content:i.videoContent,imgUrl:i.coverUrl},onPlay:this.onPlay},null)))?o:{default:()=>[o]}),t(c,{title:"\u5B66\u5458\u5217\u8868",titleClass:"van-hairline--bottom"},{default:()=>[this.dataShow?t(C,{loading:this.loading,"onUpdate:loading":i=>this.loading=i,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},n(s=this.buyUserList.map(i=>t(y,{class:"mb12",users:{avatar:i.avatar,studentId:i.userId,studentName:i.username,createTime:i.createTime}},null)))?s:{default:()=>[s]}):t(N,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5B66\u751F\u8D2D\u4E70"},null)]})]})]}),this.share=="1"&&this.detailList.length>0&&t(_,{position:"bottom"},{default:()=>[t("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[t(U,{block:!0,round:!0,type:"primary",onClick:()=>{this.shareStatus=!0}},{default:()=>[S("\u5206\u4EAB\u8BFE\u7A0B")]})])]}),t(x,{show:this.shareStatus,"onUpdate:show":i=>this.shareStatus=i,style:{background:"transparent"}},{default:()=>[t(G,{teacherId:this.userInfo.id,shareUrl:this.shareUrl,shareType:"video"},{default:()=>[t(w,{class:r.shareCourse,coverClass:r.coverClass,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.headUrl,studentCount:this.userInfo.buyNum,existBuy:0,subjectName:this.userInfo.lessonSubjectName}},null)]})]})])}});export{os as default};