1 |
- import{_ as d}from"./wx_bg.bc417687.js";import{C as u}from"./index.34e13dc3.js";import{S as r}from"./index.93b8dae9.js";import{U as c}from"./index.426f79cf.js";import{d as p,D as m,a as o,x as f,B as h,j as g}from"./vendor.75c233d7.js";import{e as a,s as n,p as x,r as b}from"./index.3d1a86cd.js";import{C as v}from"./index.f85989e5.js";import{s as w}from"./share.5861ce84.js";import{q as _}from"./index.339fc024.js";/* empty css *//* empty css */import"./bars.4f1962a6.js";/* empty css *//* empty css */import"./icon_teacher.40b6f077.js";import"./icon_timer2.5fb1750d.js";const j="_introduction_q1sek_1",y="_wxpopup_q1sek_9";var i={"video-detail":"_video-detail_q1sek_1",introduction:j,wxpopup:y};function C(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!f(e)}const I=e=>{const t=`../images/${e}`;return{"../images/wx_bg.png":d}[t].default};var H=p({name:"VideoDetail",data(){const e=this.$route.query;return{userInfo:{},detailList:[],buyUserList:[],dataShow:!0,loading:!1,finished:!1,recomUserId:e.recomUserId,params:{videoLessonGroupId:e.groupId,page:1,rows:20},wxStatus:!1}},async mounted(){try{a().isApp?n.platformType==="STUDENT"?window.location.replace(`${location.origin}/student/#/videoDetail?${_.stringify(this.$route.query)}`):n.platformType==="TEACHER"&&m.alert({title:"\u63D0\u793A",message:"\u8BF7\u4F7F\u7528\u9177\u4E50\u79C0\u5B66\u751F\u7AEF\u626B\u7801\u6253\u5F00",confirmButtonColor:"#2dc7aa"}).then(()=>{x({api:"back"})}):this.reCall();const t=(await b.post("/api-teacher/open/videoShareProfit",{data:{bizId:this.params.videoLessonGroupId,userId:this.recomUserId}})).data||{},{lessonGroup:s,detailList:l}=t.videoGroup;this.userInfo={username:t.name,headUrl:t.avatar,buyNum:s.countStudent,lessonNum:s.lessonCount,lessonName:s.lessonName,lessonDesc:s.lessonDesc,lessonPrice:s.lessonPrice,lessonCoverUrl:s.lessonCoverUrl},this.detailList=l||[]}catch{}console.log()},methods:{reCall(){const{origin:e}=location;let t=e+"/student/#/videoDetail";const s=this.$route.query;t+=`?recomUserId=${this.recomUserId}&groupId=${s.groupId}`,console.log(t),w(t,{})},onShare(){if(a().weixin){this.wxStatus=!0;return}this.reCall(),setTimeout(()=>{window.location.href=location.origin+"/student/#/download"},3e3)}},render(){let e;return o("div",{class:[i["video-detail"],"mb12"]},[o(c,{userInfo:this.userInfo},null),o(r,{border:!0},{default:()=>[o("p",{class:i.introduction},[this.userInfo.lessonDesc])]}),o(r,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",contentStyle:{paddingTop:"0"}},C(e=this.detailList.map(t=>o(u,{class:"mb12",detail:{id:t.id,title:t.videoTitle,content:t.videoContent,imgUrl:t.coverUrl}},null)))?e:{default:()=>[e]}),o(v,{position:"bottom"},{default:()=>[o("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[o(h,{block:!0,round:!0,type:"primary",onClick:this.onShare},{default:()=>[g("\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B")]})])]}),this.wxStatus&&o("div",{class:i.wxpopup,onClick:()=>{this.wxStatus=!1}},[o("img",{src:I("wx_bg.png"),alt:""},null)])])}});export{H as default,I as getAssetsHomeFile};
|