1 |
- import{_ as d,c as m,d as f}from"./icon_discount.535f7618.js";import{_ as g,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{C as y}from"./index.9b67dbb3.js";import{S as u}from"./index.363c593b.js";import{U as I}from"./index.b2bac310.js";import{d as T,b as a,s as p,p as n,D as v,e as w,i as s,B as S,A as C,$ as U}from"./index.7994470a.js";import{C as D}from"./index.aaa3ed2b.js";import{s as x}from"./share.905d1919.js";import{q as c}from"./index.570461cd.js";import"./index.777f4790.js";import"./index.2fbdc579.js";import"./index.0262b810.js";import"./bars.4f1962a6.js";import"./icon_album_active.ce98b2a8.js";import"./icon_music_active.3b316ab8.js";import"./index.9cdb5783.js";import"./icon_teacher.40b6f077.js";import"./icon_timer2.5fb1750d.js";import"./icon-jiaozi.20e415ca.js";const A="_introduction_q1sek_1",q="_wxpopup_q1sek_9";var l={"video-detail":"_video-detail_q1sek_1",introduction:A,wxpopup:q};function N(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!U(e)}const $=e=>{const o=`../images/${e}`;return{"../images/icon-cert.png":d,"../images/icon_discount.png":m,"../images/icon_music.png":f,"../images/music-share-banner.png":g,"../images/share-banner.png":h,"../images/share-vip-tips.png":_,"../images/wx_bg.png":b}[o].default};var ee=T({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(p.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?${c.stringify(e)}`):(n({api:"openWebView",content:{url:`${location.origin}/student/#/videoDetail?${c.stringify(e)}`,orientation:1,isHideTitle:!1}}),n({api:"back"}));return}else p.platformType==="TEACHER"&&v.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 o=(await w.post("/api-teacher/open/videoShareProfit",{data:{bizId:this.params.videoLessonGroupId,userId:this.recomUserId}})).data||{},{lessonGroup:t,detailList:i}=o.videoGroup;this.userInfo={username:t.username,headUrl:t.avatar,isDegree:!!o.videoGroup.degreeFlag,isTeacher:!!o.videoGroup.teacherFlag,buyNum:t.countStudent,lessonNum:t.lessonCount,lessonName:t.lessonName,lessonDesc:t.lessonDesc,lessonPrice:t.lessonPrice,relationType:t.relationType,lessonCoverUrl:t.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 o=e+"/student/#/videoDetail";const t=this.$route.query;o+=`?recomUserId=${t.userType&&t.userType=="STUDENT"?"":this.recomUserId}&groupId=${t.groupId}`,console.log(o),x(o,{})},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(I,{userInfo:this.userInfo,showBuy:!1},null),s(u,{border:!0},{default:()=>[s("p",{class:l.introduction},[this.userInfo.lessonDesc])]}),s(u,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",contentStyle:{paddingTop:"0"}},N(e=this.detailList.map(o=>{const i=(o.musicAlbumInfos||[]).map(r=>({relationMusicAlbum:r.relationType,musicAlbumName:r.name,musicAlbumId:r.musicAlbumId,useRelationType:this.userInfo.relationType}));return s(y,{musicAlbumInfos:i,detail:{id:o.id,title:o.videoTitle,content:o.videoContent,imgUrl:o.coverUrl}},null)}))?e:{default:()=>[e]}),s(D,{position:"bottom"},{default:()=>[s("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[s(S,{block:!0,round:!0,type:"primary",onClick:this.onShare},{default:()=>[C("\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B")]})])]}),this.wxStatus&&s("div",{class:l.wxpopup,onClick:()=>{this.wxStatus=!1}},[s("img",{src:$("wx_bg.png"),alt:""},null)])])}});export{ee as default,$ as getAssetsHomeFile};
|