1 |
- var y=Object.defineProperty,I=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var h=(s,i,e)=>i in s?y(s,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[i]=e,u=(s,i)=>{for(var e in i||(i={}))x.call(i,e)&&h(s,e,i[e]);if(c)for(var e of c(i))C.call(i,e)&&h(s,e,i[e]);return s},v=(s,i)=>I(s,b(i));import{C as L}from"./index.845eb2d1.js";import{S}from"./index.4b159732.js";import{C as j}from"./index.6f3e6dff.js";import{s as n,r,C as U}from"./index.b7ae686a.js";import{d as T,T as N,a as t,C as m,u as w,j as d,G as D,H as p,x as V,w as H,I as F,g as B,p as R,B as Y}from"./vendor.7fdfd452.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{i as P}from"./icon_student.bbb32387.js";import"./bars.4f1962a6.js";/* empty css */const q="_titleInfo_veoie_1",G="_label_veoie_8",k="_userLogo_veoie_33",z="_users_veoie_50",E="_level_veoie_61",M="_videoDesc_veoie_71",O="_title_veoie_1",W="_isFixed_veoie_111",$="_messageContainer_veoie_117";var a={"video-class-detail":"_video-class-detail_veoie_1",titleInfo:q,label:G,"open-teacher-info":"_open-teacher-info_veoie_26",userLogo:k,"teacher-info":"_teacher-info_veoie_44",users:z,"teacher-name":"_teacher-name_veoie_54",level:E,"teacher-desc":"_teacher-desc_veoie_67",videoDesc:M,"message-list":"_message-list_veoie_79","message-active":"_message-active_veoie_79",title:O,"message-name":"_message-name_veoie_83","message-time":"_message-time_veoie_87",isFixed:W,messageContainer:$};function g(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!V(s)}var ce=T({name:"VideoClassDetail",data(){const s=this.$route.query;return{groupId:s.groupId,classId:s.classId,tabIndex:1,title:"",currentClassIndex:1,detailList:[],posterUrl:"",srcUrl:"",message:"",navHeight:0,reload:!1,videoContent:"",list:[],dataShow:!0,loading:!1,finished:!1,params:{page:1,rows:20},freeRate:0,trySee:!1,videoHeight:"212px"}},computed:{users(){return n.user.data},offsetTop(){const s=this.navHeight;return Number(s)+44+"px"}},async mounted(){var s,i;this.navHeight=sessionStorage.getItem("navHeight")||0;try{const o=(await r.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:this.groupId}})).data||{};this.title=o.lessonGroup.lessonName,this.detailList=o.detailList||[],((s=n.user.data)==null?void 0:s.userId)!==o.lessonGroup.teacherId&&(this.trySee=!o.alreadyBuy),this.detailList.forEach((l,_)=>{l.id===Number(this.classId)&&(this.posterUrl=l.coverUrl,this.srcUrl=l.videoUrl,this.title=l.videoTitle,this.currentClassIndex=_+1,this.videoContent=l.videoContent)});const f=await r.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"video_lesson_free_rate"}});this.freeRate=((i=f.data[0])==null?void 0:i.paramValue)||0,this.getList()}catch{}},methods:{onSearch(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},async getList(){try{const s=this.params,i=await r.post("/api-student/videoLesson/page",{data:v(u({},s),{videoId:this.classId})});this.loading=!1;const e=i.data||{};if(console.log(e),this.list.length>0&&e.pageNo===1)return;this.list=this.list.concat(e.rows||[]),this.finished=e.pageNo>=e.totalPage,this.params.page=e.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}},onPlay(s){s.id!==Number(this.classId)&&(this.reload=!0,this.posterUrl=s.imgUrl,this.srcUrl=s.videoUrl,this.title=s.title,this.currentClassIndex=s.index,this.videoContent=s.content,this.classId=s.id,this.onSearch(),setTimeout(()=>{this.reload=!1},0))},async onSubmit(){try{await r.post("/api-teacher/videoLesson/evaluate",{data:{isTeacher:1,videoId:this.classId,content:this.message,studentId:n.user.data.userId}}),N("\u8BC4\u8BBA\u6210\u529F"),this.message="",setTimeout(()=>{this.onSearch()},1e3)}catch{}}},render(){let s,i;return t("div",{class:a["video-class-detail"]},[t(j,{src:this.srcUrl,poster:this.posterUrl,freeRate:Number(this.freeRate),trySee:this.trySee,height:this.videoHeight},null),t(m,{border:!1,class:a.cell,title:this.title,titleClass:a.titleInfo},{icon:()=>t(w,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null),value:()=>t("div",{class:a.label},[t("span",null,[this.currentClassIndex]),d("/"),this.detailList.length,d("\u8BFE\u65F6")])}),t("div",{class:a.videoDesc},[this.videoContent]),t(D,{active:this.tabIndex,"onUpdate:active":e=>this.tabIndex=e,class:a.infoField,color:"var(--van-primary)",lineWidth:20,sticky:!0,lazyRender:!0,offsetTop:this.offsetTop},{default:()=>[t(p,{title:"\u76EE\u5F55",name:1},{default:()=>[t("div",{style:{height:"calc(100vh - 320px)",overflowY:"auto"}},[t(S,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList"},g(s=this.detailList.map((e,o)=>t(L,{class:"mb12",playId:Number(this.classId),detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl,videoUrl:e.videoUrl,index:o+1},onPlay:this.onPlay},null)))?s:{default:()=>[s]})])]}),t(p,{title:"\u8BA8\u8BBA",name:3},{default:()=>[t("div",{style:{overflowY:"auto",marginBottom:"calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))"}},[this.dataShow?t(H,{loading:this.loading,"onUpdate:loading":e=>this.loading=e,finished:this.finished,finishedText:" ",immediateCheck:!1,onLoad:this.getList},g(i=this.list.map(e=>t(m,{class:[a["message-list"],e.isTeacher===1&&a["message-active"]],valueClass:a["message-time"]},{icon:()=>t(F,{class:a.userLogo,src:e.avatar||P,fit:"cover"},null),title:()=>t("div",{class:a.title},[t("div",{class:a["message-name"]},[e.userName]),t("div",{class:a["message-time"]},[B(e.evaluateTime).format("YYYY\u5E74MM\u6708DD\u65E5")])]),label:()=>t("div",{class:a.label},[e.content])})))?i:{default:()=>[i]}):t(U,{btnStatus:!1,tips:"\u6682\u65E0\u8BA8\u8BBA"},null)]),t("div",{class:[a.messageContainer]},[t(R,{placeholder:"\u5FEB\u6765\u8BA8\u8BBA\u5427\uFF5E",modelValue:this.message,"onUpdate:modelValue":e=>this.message=e},{button:()=>t(Y,{type:"primary",disabled:!this.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:this.onSubmit},{default:()=>[d("\u53D1\u5E03")]})})])]})]})])}});export{ce as default};
|