1 |
- var l=Object.defineProperty;var i=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var a=(t,e,s)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,n=(t,e)=>{for(var s in e||(e={}))p.call(e,s)&&a(t,s,e[s]);if(i)for(var s of i(e))c.call(e,s)&&a(t,s,e[s]);return t};import{C as h}from"./index.4d5f1fc1.js";import{S as u}from"./index.a3bada19.js";import{U as m}from"./index.5c9c9331.js";import{d as f,a as o,x as b,S as y,B as g,b as v}from"./vendor.8455490d.js";/* empty css */import{r as d,s as I}from"./vueFilter.0fbb0cac.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./icon_teacher.2c3a434a.js";const L="_introduction_3rqhe_1",_="_btnGroup_3rqhe_6",j="_btnMore_3rqhe_10";var r={"video-detail":"_video-detail_3rqhe_1",introduction:L,btnGroup:_,btnMore:j};function U(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!b(t)}var k=f({name:"VideoDetail",data(){const t=this.$route.query;return{userInfo:{},detailList:[],buyUserList:[],dataShow:!0,loading:!1,finished:!1,params:{groupId:t.groupId,page:1,rows:20}}},async mounted(){try{const e=(await d.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:this.params.groupId}})).data||{},s=I.user.data||{};this.userInfo={username:s.username,headUrl:s.headUrl,buyNum:0,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 s=(await d.post("/api-teacher/videoLesson/pageStudent",{data:n({},t)})).data||{};if(this.buyUserList.length>0&&s.pageNo===1)return;this.buyUserList=this.buyUserList.concat(s.list||[]),this.finished=s.pageNo>=s.totalPage,this.params.page=s.pageNo+1,this.dataShow=this.buyUserList.length>0,this.userInfo.buyNum=s.totalCount||0}catch{}},onPlay(t){this.$router.push({path:"/videoClassDetail",query:{groupId:this.params.groupId,classId:t.id}})},onBuy(){this.$router.push({path:"/orderDetail",query:{type:"VIDEO",groupId:this.params.groupId}})}},render(){let t;return o("div",{class:[r["video-detail"],"mb12"]},[o(m,{userInfo:this.userInfo},null),o(u,null,{default:()=>[o("p",{class:r.introduction},[this.userInfo.lessonDesc])]}),o(u,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",class:"mb12"},U(t=this.detailList.map(e=>o(h,{class:"mb12",detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl},onPlay:this.onPlay},null)))?t:{default:()=>[t]}),o(y,{offsetBottom:0,position:"bottom"},{default:()=>[o("div",{class:["btnGroup",r.btnMore]},[o(g,{block:!0,round:!0,type:"primary",onClick:this.onBuy},{default:()=>[v("\u7ACB\u5373\u8D2D\u4E70")]})])]})])}});export{k as default};
|