index-legacy.17bdffc7.js 5.5 KB

12
  1. !function(){function e(e,n,t,i,o,a,r){try{var s=e[a](r),c=s.value}catch(u){return void t(u)}s.done?n(c):Promise.resolve(c).then(i,o)}var n=document.createElement("style");n.innerHTML="._video-detail_q1sek_1 ._introduction_q1sek_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._video-detail_q1sek_1 .van-tabs__wrap{margin-bottom:.4rem}._video-detail_q1sek_1 ._wxpopup_q1sek_9{width:100%;height:100vh;position:fixed;top:0;left:0;background:rgba(0,0,0,.5);z-index:9999}._video-detail_q1sek_1 ._wxpopup_q1sek_9 img{width:88%;margin:0 6%}\n",document.head.appendChild(n),System.register(["./icon_discount-legacy.51763f3b.js","./share-vip-tips-legacy.0d425f76.js","./share-banner-legacy.3a0e6967.js","./wx_bg-legacy.a09a21f9.js","./index-legacy.fba2875c.js","./index-legacy.199a0ec1.js","./index-legacy.7d84de09.js","./index-legacy.632c23f1.js","./index-legacy.a026685b.js","./share-legacy.125a9021.js","./index-legacy.7dcec7b3.js","./index-legacy.d92f7da7.js","./index-legacy.78361179.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.d2829e23.js","./icon_music_active-legacy.cc68af68.js","./index-legacy.f231f1c5.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js"],(function(n){"use strict";var t,i,o,a,r,s,c,u,l,d,f,p,m,g,v,y,h,_,b,w,x,j,T;return{setters:[function(e){t=e._,i=e.c,o=e.d},function(e){a=e._,r=e.a},function(e){s=e._},function(e){c=e._},function(e){u=e.d,l=e.f,d=e.g,f=e.y,p=e.n,m=e.D,g=e.w,v=e.j,y=e.B,h=e.z,_=e.Z},function(e){b=e.C},function(e){w=e.S},function(e){x=e.U},function(e){j=e.C},function(e){T=e.s},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var I="_video-detail_q1sek_1",k="_introduction_q1sek_1",S="_wxpopup_q1sek_9";var U=n("getAssetsHomeFile",(function(e){var n="../images/".concat(e);return{"../images/icon-cert.png":t,"../images/icon_discount.png":i,"../images/icon_music.png":o,"../images/music-share-banner.png":a,"../images/share-banner.png":s,"../images/share-vip-tips.png":r,"../images/wx_bg.png":c}[n].default}));n("default",u({name:"VideoDetail",data:function(){var 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:function(){if(l().isApp){if("STUDENT"===d.platformType){var e=this.$route.query;return e.recomUserId=e.userType&&"STUDENT"==e.userType?"":e.recomUserId,void(l().ios?window.location.replace("".concat(location.origin,"/student/#/videoDetail?").concat(f.stringify(e))):(p({api:"openWebView",content:{url:"".concat(location.origin,"/student/#/videoDetail?").concat(f.stringify(e)),orientation:1,isHideTitle:!1}}),p({api:"back"})))}"TEACHER"===d.platformType&&m.alert({title:"提示",message:"请使用酷乐秀学生端扫码打开",confirmButtonColor:"#2dc7aa"}).then((function(){p({api:"back"})}))}else this.reCall()},mounted:function(){var n,t=this;return(n=regeneratorRuntime.mark((function e(){var n,i,o,a,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.post("/api-teacher/open/videoShareProfit",{data:{bizId:t.params.videoLessonGroupId,userId:t.recomUserId}});case 3:n=e.sent,i=n.data||{},o=i.videoGroup,a=o.lessonGroup,r=o.detailList,t.userInfo={username:a.username,headUrl:a.avatar,isDegree:!!i.videoGroup.degreeFlag,isTeacher:!!i.videoGroup.teacherFlag,buyNum:a.countStudent,lessonNum:a.lessonCount,lessonName:a.lessonName,lessonDesc:a.lessonDesc,lessonPrice:a.lessonPrice,relationType:a.relationType,lessonCoverUrl:a.lessonCoverUrl},t.detailList=r||[],e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})),function(){var t=this,i=arguments;return new Promise((function(o,a){var r=n.apply(t,i);function s(n){e(r,o,a,s,c,"next",n)}function c(n){e(r,o,a,s,c,"throw",n)}s(void 0)}))})()},methods:{locationReplace:function(e){history.replaceState?(history.replaceState(null,document.title,e),window.location.reload()):location.replace(e)},reCall:function(){var e=location.origin+"/student/#/videoDetail",n=this.$route.query;e+="?recomUserId=".concat(n.userType&&"STUDENT"==n.userType?"":this.recomUserId,"&groupId=").concat(n.groupId),console.log(e),T(e,{})},onShare:function(){l().weixin?this.wxStatus=!0:(this.reCall(),setTimeout((function(){window.location.href=location.origin+"/student/#/download"}),3e3))}},render:function(){var e,n,t=this;return v("div",{class:[I,"mb12"]},[v(x,{userInfo:this.userInfo,showBuy:!1},null),v(w,{border:!0},{default:function(){return[v("p",{class:k},[t.userInfo.lessonDesc])]}}),v(w,{title:"课程列表",icon:"courseList",contentStyle:{paddingTop:"0"}},(n=e=this.detailList.map((function(e){var n=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,useRelationType:t.userInfo.relationType}}));return v(b,{musicAlbumInfos:n,detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl}},null)})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!_(n)?e:{default:function(){return[e]}})),v(j,{position:"bottom"},{default:function(){return[v("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[v(y,{block:!0,round:!0,type:"primary",onClick:t.onShare},{default:function(){return[h("下载酷乐秀进入课程")]}})])]}}),this.wxStatus&&v("div",{class:S,onClick:function(){t.wxStatus=!1}},[v("img",{src:U("wx_bg.png"),alt:""},null)])])}}))}}}))}();