index-legacy.ceadac5d.js 7.4 KB

12345678910111213
  1. ;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.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(__vite_style__);System.register(['./icon-cert-legacy.af17c6c7.js','./wx_bg-legacy.d810cdd5.js','./index-legacy.dcfa0020.js','./index-legacy.3ecf4a67.js','./index-legacy.8f76ecef.js','./vendor-legacy.eeb61cf8.js','./index-legacy.1bceca67.js','./index-legacy.e9ff1c6b.js','./share-legacy.d2e87599.js','./index-legacy.c75fe8a2.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a4.js','./bars-legacy.9085ff9b.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a10.js','./icon_teacher-legacy.42ba77b1.js','./icon_timer2-legacy.b6c78faa.js'],function(exports){'use strict';var __glob_17_0,__glob_17_1,__glob_17_2,__glob_17_3,CourseVideoItem,SectionDetail,UserDetail,defineComponent,Dialog,createVNode,isVNode,Button,createTextVNode,browser,state,postMessage,request,ColSticky,shareCall,qs;return{setters:[function(module){__glob_17_0=module._;__glob_17_1=module.b;},function(module){__glob_17_2=module._;__glob_17_3=module.a;},function(module){CourseVideoItem=module.C;},function(module){SectionDetail=module.S;},function(module){UserDetail=module.U;},function(module){defineComponent=module.d;Dialog=module.D;createVNode=module.a;isVNode=module.x;Button=module.B;createTextVNode=module.j;},function(module){browser=module.e;state=module.s;postMessage=module.p;request=module.r;},function(module){ColSticky=module.C;},function(module){shareCall=module.s;},function(module){qs=module.q;},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var introduction="_introduction_q1sek_1";var wxpopup="_wxpopup_q1sek_9";var styles={"video-detail":"_video-detail_q1sek_1",introduction:introduction,wxpopup:wxpopup};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var getAssetsHomeFile=exports('getAssetsHomeFile',function(fileName){var path="../images/".concat(fileName);var modules={"../images/icon-cert.png":__glob_17_0,"../images/icon_music.png":__glob_17_1,"../images/music-share-banner.png":__glob_17_2,"../images/wx_bg.png":__glob_17_3};return modules[path].default;});var index=exports('default',defineComponent({name:'VideoDetail',data:function data(){var query=this.$route.query;return{userInfo:{},detailList:[],buyUserList:[],// 购买学生数
  2. dataShow:true,// 判断是否有数据
  3. loading:false,finished:false,recomUserId:query.recomUserId,// 分享人编号
  4. params:{videoLessonGroupId:query.groupId,page:1,rows:20},wxStatus:false};},created:function created(){if(browser().isApp){if(state.platformType==='STUDENT'){// 自动跳转到学生端视频课详情购买页
  5. window.location.replace("".concat(location.origin,"/student/#/videoDetail?").concat(qs.stringify(this.$route.query)));// 为了处理andoird webview的跳转问题
  6. if(browser().ios){window.location.replace("".concat(location.origin,"/student/#/videoDetail?").concat(qs.stringify(this.$route.query)));}else{postMessage({api:'openWebView',content:{url:"".concat(location.origin,"/student/#/videoDetail?").concat(qs.stringify(this.$route.query)),orientation:1,isHideTitle:false}});postMessage({api:'back'});}// this.locationReplace(
  7. // `${location.origin}/student/#/videoDetail?${qs.stringify(
  8. // this.$route.query
  9. // )}`
  10. // )
  11. return;}else if(state.platformType==='TEACHER'){Dialog.alert({title:'提示',message:'请使用酷乐秀学生端扫码打开',confirmButtonColor:'#2dc7aa'}).then(function(){postMessage({api:'back'});});}}else{// 如果不在app里面则不需要唤起操作
  12. this.reCall();}},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res,result,_result$videoGroup,lessonGroup,detailList;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.post("/api-teacher/open/videoShareProfit",{data:{bizId:_this.params.videoLessonGroupId,userId:_this.recomUserId}});case 3:res=_context.sent;result=res.data||{};_result$videoGroup=result.videoGroup,lessonGroup=_result$videoGroup.lessonGroup,detailList=_result$videoGroup.detailList;_this.userInfo={username:result.name,headUrl:result.avatar,buyNum:lessonGroup.countStudent,lessonNum:lessonGroup.lessonCount,lessonName:lessonGroup.lessonName,lessonDesc:lessonGroup.lessonDesc,lessonPrice:lessonGroup.lessonPrice,lessonCoverUrl:lessonGroup.lessonCoverUrl};_this.detailList=detailList||[];_context.next=12;break;case 10:_context.prev=10;_context.t0=_context["catch"](0);case 12:case"end":return _context.stop();}}},_callee,null,[[0,10]]);}))();},methods:{locationReplace:function locationReplace(url){// alert(url)
  13. if(history.replaceState){history.replaceState(null,document.title,url);window.location.reload();}else{location.replace(url);}},reCall:function reCall(){var _location=location,origin=_location.origin;var str=origin+'/student/#/videoDetail';var params=this.$route.query;str+="?recomUserId=".concat(this.recomUserId,"&groupId=").concat(params.groupId);console.log(str);shareCall(str,{});},onShare:function onShare(){if(browser().weixin){this.wxStatus=true;return;}this.reCall();setTimeout(function(){window.location.href=location.origin+'/student/#/download';},3000);}},render:function render(){var _this2=this;var _slot;return createVNode("div",{"class":[styles['video-detail'],'mb12']},[createVNode(UserDetail,{"userInfo":this.userInfo,"showBuy":false},null),createVNode(SectionDetail,{"border":true},{default:function _default(){return[createVNode("p",{"class":styles.introduction},[_this2.userInfo.lessonDesc])];}}),createVNode(SectionDetail,{"title":"课程列表","icon":"courseList","contentStyle":{paddingTop:'0'}},_isSlot(_slot=this.detailList.map(function(item){return createVNode(CourseVideoItem,{"class":'mb12',"detail":{id:item.id,title:item.videoTitle,content:item.videoContent,imgUrl:item.coverUrl}},null);}))?_slot:{default:function _default(){return[_slot];}}),createVNode(ColSticky,{"position":"bottom"},{default:function _default(){return[createVNode("div",{"class":['btnGroup'],"style":{paddingTop:'12px'}},[createVNode(Button,{"block":true,"round":true,"type":"primary","onClick":_this2.onShare},{default:function _default(){return[createTextVNode("\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B")];}})])];}}),this.wxStatus&&createVNode("div",{"class":styles.wxpopup,"onClick":function onClick(){_this2.wxStatus=false;}},[createVNode("img",{"src":getAssetsHomeFile('wx_bg.png'),"alt":""},null)])]);}}));}};});})();