1 |
- 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 y}from"./share-banner.3808bbad.js";import{_ as h}from"./wx_bg.cce2a6c0.js";import{d as b,f as a,g as u,v as p,n,D as I,y as T,j as s,B as v,A as w,$ as S}from"./ResizeObserver.es.39b48a47.js";import{C}from"./index.a177d001.js";import{S as c}from"./index.f11db230.js";import{U}from"./index.4c32c83c.js";import{C as D}from"./index.b1c0c586.js";import{s as x}from"./share.098d3d09.js";import"./index.db115763.js";import"./index.fcbcb027.js";import"./index.34ac729a.js";import"./bars.4f1962a6.js";import"./icon_album_active.cb923735.js";import"./icon_music_active.f55820b3.js";import"./index.9f5e14d1.js";import"./icon_teacher.40b6f077.js";import"./icon_timer2.5fb1750d.js";import"./index.dc19bc54.js";const A="_introduction_q1sek_1",$="_wxpopup_q1sek_9";var l={"video-detail":"_video-detail_q1sek_1",introduction:A,wxpopup:$};function N(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":y,"../images/share-vip-tips.png":_,"../images/wx_bg.png":h}[t].default};var Z=b({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,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(){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"}},N(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{Z as default,q as getAssetsHomeFile};
|