import{_ as d,c as m,d as g}from"./icon_discount.535f7618.js";import{_ as f,a as _}from"./share-vip-tips.16c5753d.js";import{_ as h}from"./share-banner.3808bbad.js";import{_ as b}from"./wx_bg.cce2a6c0.js";import{d as y,f as a,g as u,u as p,n,D as I,x as T,j as s,B as v,z as w,Z as S}from"./index.3bfa6a0e.js";import{C}from"./index.5493d234.js";import{S as c}from"./index.64a4557e.js";import{U}from"./index.f4e51529.js";import{C as D}from"./index.aac5e6b2.js";import{s as x}from"./share.58ceb09e.js";import"./index.79997a38.js";import"./index.0fd5538f.js";import"./index.c171ade0.js";import"./bars.4f1962a6.js";import"./icon_album_active.469423f9.js";import"./icon_music_active.1e7b47ef.js";import"./index.85c8c2f7.js";import"./icon_teacher.40b6f077.js";import"./icon_timer2.5fb1750d.js";import"./icon-jiaozi.20e415ca.js";const A="_introduction_q1sek_1",N="_wxpopup_q1sek_9";var l={"video-detail":"_video-detail_q1sek_1",introduction:A,wxpopup:N};function $(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!S(e)}const q=e=>{const t=`../images/${e}`;return{"../images/icon-cert.png":d,"../images/icon_discount.png":m,"../images/icon_music.png":g,"../images/music-share-banner.png":f,"../images/share-banner.png":h,"../images/share-vip-tips.png":_,"../images/wx_bg.png":b}[t].default};var Y=y({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}},created(){if(a().isApp)if(u.platformType==="STUDENT"){const e=this.$route.query;e.recomUserId=e.userType&&e.userType=="STUDENT"?"":e.recomUserId,a().ios?window.location.replace(`${location.origin}/student/#/videoDetail?${p.stringify(e)}`):(n({api:"openWebView",content:{url:`${location.origin}/student/#/videoDetail?${p.stringify(e)}`,orientation:1,isHideTitle:!1}}),n({api:"back"}));return}else u.platformType==="TEACHER"&&I.alert({title:"\u63D0\u793A",message:"\u8BF7\u4F7F\u7528\u9177\u4E50\u79C0\u5B66\u751F\u7AEF\u626B\u7801\u6253\u5F00",confirmButtonColor:"#2dc7aa"}).then(()=>{n({api:"back"})});else this.reCall()},async mounted(){try{const t=(await T.post("/api-teacher/open/videoShareProfit",{data:{bizId:this.params.videoLessonGroupId,userId:this.recomUserId}})).data||{},{lessonGroup:o,detailList:i}=t.videoGroup;this.userInfo={username:o.username,headUrl:o.avatar,isDegree:!!t.videoGroup.degreeFlag,isTeacher:!!t.videoGroup.teacherFlag,buyNum:o.countStudent,lessonNum:o.lessonCount,lessonName:o.lessonName,lessonDesc:o.lessonDesc,lessonPrice:o.lessonPrice,relationType:o.relationType,lessonCoverUrl:o.lessonCoverUrl},this.detailList=i||[]}catch{}},methods:{locationReplace(e){history.replaceState?(history.replaceState(null,document.title,e),window.location.reload()):location.replace(e)},reCall(){const{origin:e}=location;let t=e+"/student/#/videoDetail";const o=this.$route.query;t+=`?recomUserId=${o.userType&&o.userType=="STUDENT"?"":this.recomUserId}&groupId=${o.groupId}&p=${o.p}`,console.log(t),x(t,{})},onShare(){if(a().weixin){this.wxStatus=!0;return}this.reCall(),setTimeout(()=>{window.location.href=location.origin+"/student/#/download"},3e3)}},render(){let e;return s("div",{class:[l["video-detail"],"mb12"]},[s(U,{userInfo:this.userInfo,showBuy:!1},null),s(c,{border:!0},{default:()=>[s("p",{class:l.introduction},[this.userInfo.lessonDesc])]}),s(c,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",contentStyle:{paddingTop:"0"}},$(e=this.detailList.map(t=>{const i=(t.musicAlbumInfos||[]).map(r=>({relationMusicAlbum:r.relationType,musicAlbumName:r.name,musicAlbumId:r.musicAlbumId,useRelationType:this.userInfo.relationType}));return s(C,{musicAlbumInfos:i,detail:{id:t.id,title:t.videoTitle,content:t.videoContent,imgUrl:t.coverUrl}},null)}))?e:{default:()=>[e]}),s(D,{position:"bottom"},{default:()=>[s("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[s(v,{block:!0,round:!0,type:"primary",onClick:this.onShare},{default:()=>[w("\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B")]})])]}),this.wxStatus&&s("div",{class:l.wxpopup,onClick:()=>{this.wxStatus=!1}},[s("img",{src:q("wx_bg.png"),alt:""},null)])])}});export{Y as default,q as getAssetsHomeFile};
