index.e3979e35.js 4.1 KB

1
  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 h}from"./share-banner.3808bbad.js";import{_ as y}from"./wx_bg.cce2a6c0.js";import{d as b,f as a,g as u,y as p,n,D as I,w,j as s,B as T,z as v,Z as S}from"./index.e6d6174e.js";import{C}from"./index.43f63892.js";import{S as c}from"./index.884a0e76.js";import{U}from"./index.af98ec6d.js";import{C as D}from"./index.b0eda115.js";import{s as x}from"./share.57719e8d.js";import"./index.af99cf22.js";import"./index.67c54471.js";import"./index.05f2b7dd.js";import"./bars.4f1962a6.js";import"./icon_album_active.ce98b2a8.js";import"./icon_music_active.3b316ab8.js";import"./index.4aea64de.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 q(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!S(e)}const $=e=>{const o=`../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":y}[o].default};var Y=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 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(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"}},q(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(C,{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(T,{block:!0,round:!0,type:"primary",onClick:this.onShare},{default:()=>[v("\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{Y as default,$ as getAssetsHomeFile};