import{_ as m,c as f,d as g}from"./icon_discount.535f7618.js";import{_,a as y}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 I,f as n,g as p,A as r,v as d,n as l,D as T,y as v,j as s,E as w,B as S,a0 as C}from"./ResizeObserver.es.62ab429c.js";import{C as U}from"./index.4b4c9d31.js";import{S as c}from"./index.7f3f7360.js";import{U as D}from"./index.58a086a9.js";import{C as x}from"./index.105e15bd.js";import{s as A}from"./share.d1ca65b8.js";import"./index.d7a13e47.js";import"./index.021584f9.js";import"./index.0eba5ce9.js";import"./bars.4f1962a6.js";import"./icon_album_active.ce98b2a8.js";import"./icon_music_active.3b316ab8.js";import"./index.e24f8570.js";import"./icon_teacher.40b6f077.js";import"./index.a6e5e68b.js";const N="_introduction_q1sek_1",$="_wxpopup_q1sek_9";var u={"video-detail":"_video-detail_q1sek_1",introduction:N,wxpopup:$};function q(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!C(e)}const k=e=>{const t=`../images/${e}`;return{"../images/icon-cert.png":m,"../images/icon_discount.png":f,"../images/icon_music.png":g,"../images/music-share-banner.png":_,"../images/share-banner.png":h,"../images/share-vip-tips.png":y,"../images/wx_bg.png":b}[t].default};var Z=I({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(n().isApp)if(p.platformType==="STUDENT"){const e=this.$route.query;e.recomUserId=e.userType&&e.userType=="STUDENT"?"":e.recomUserId,n().ios?window.location.replace(`${r()}/student/#/videoDetail?${d.stringify(e)}`):(l({api:"openWebView",content:{url:`${r()}/student/#/videoDetail?${d.stringify(e)}`,orientation:1,isHideTitle:!1}}),l({api:"back"}));return}else p.platformType==="TEACHER"&&T.alert({title:"\u63D0\u793A",message:"\u8BF7\u4F7F\u7528\u9177\u4E50\u79C0\u5B66\u751F\u7AEF\u626B\u7801\u6253\u5F00",confirmButtonColor:"#2dc7aa"}).then(()=>{l({api:"back"})});else this.reCall()},async mounted(){try{const t=(await v.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,payType:o.payType,type:"video",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(){let e=r()+"/student/#/videoDetail";const t=this.$route.query;e+=`?recomUserId=${t.userType&&t.userType=="STUDENT"?"":this.recomUserId}&groupId=${t.groupId}&p=${t.p}`,console.log(e),A(e,{})},onShare(){if(n().weixin){this.wxStatus=!0;return}this.reCall(),setTimeout(()=>{window.location.href=r()+"/student/#/download"},3e3)}},render(){let e;return s("div",{class:[u["video-detail"],"mb12"]},[s(D,{userInfo:this.userInfo,showBuy:!1},null),s(c,{border:!0},{default:()=>[s("p",{class:u.introduction},[this.userInfo.lessonDesc])]}),s(c,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",contentStyle:{paddingTop:"0"}},q(e=this.detailList.map(t=>{const i=(t.musicAlbumInfos||[]).map(a=>({relationMusicAlbum:a.relationType,musicAlbumName:a.name,musicAlbumId:a.musicAlbumId,useRelationType:this.userInfo.relationType}));return s(U,{musicAlbumInfos:i,detail:{id:t.id,title:t.videoTitle,content:t.videoContent,imgUrl:t.coverUrl}},null)}))?e:{default:()=>[e]}),s(x,{position:"bottom"},{default:()=>[s("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[s(w,{block:!0,round:!0,type:"primary",onClick:this.onShare},{default:()=>[S("\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B")]})])]}),this.wxStatus&&s("div",{class:u.wxpopup,onClick:()=>{this.wxStatus=!1}},[s("img",{src:k("wx_bg.png"),alt:""},null)])])}});export{Z as default,k as getAssetsHomeFile};
