a45566f.js 12 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[34],{1022:function(e,t,o){"use strict";o.r(t);o(12),o(13),o(6),o(16),o(11),o(17);var r=o(4),d=(o(14),o(90),o(40),o(413),o(5));function n(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,o)}return t}var c={layout:"video",data:function(){return{goods_id:"",chapter_id:"",courseData:{},courseActiveNames:[],chapterdigList:[],is_vshow:!1,is_buy:!1,is_try_time:0,options:{autoplay:!1,playsinline:!0,preload:!0,height:"100%",cover:"",skinLayout:[{name:"bigPlayButton",align:"blabs",x:30,y:80},{name:"infoDisplay"},{name:"controlBar",align:"blabs",x:0,y:0,children:[{align:"tlabs",x:0,y:0,name:"progress"},{align:"tl",x:10,y:15,name:"playButton"},{align:"tl",x:10,y:7,name:"timeDisplay"},{align:"tr",x:10,y:15,name:"fullScreenButton"},{align:"tr",x:10,y:12,name:"volume"}]}]},vedioSrc:""}},components:{},head:function(){return{title:"视频播放-".concat(this.basicSet.seo.title),meta:[{name:"keywords",content:"视频播放,".concat(this.basicSet.seo.keywords)},{name:"description",content:"".concat(this.basicSet.seo.description)}]}},computed:function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?n(Object(source),!0).forEach((function(t){Object(r.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):n(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({},Object(d.b)(["basicSet"])),mounted:function(){this.goods_id=this.$route.query.id,this.chapter_id=this.fun.getKey("chapter_id"),this.getCourseData()},methods:{timeupdate:function(e){this.is_try_time&&this.$refs.VueAliplayerV2.getCurrentTime()>=this.is_try_time&&(this.vedioSrc="",this.is_buy=!0,this.$message.error("请升级会员或者购买课程"))},toGoods:function(){var e=this.goods_id;this.$baseURL?window.open(this.fun.getSiteRoot()+"/plugins/shop_server/goods?i="+this.fun.getKeyByI()+"&id="+e,"_blank"):window.open(this.fun.getSiteRoot()+"/plugins/shop_server/goods/"+e+"?i="+this.fun.getKeyByI(),"_blank")},toUrl:function(e,t,o){this.$router.push(this.fun.getUrl(e,t,o))},getCourseData:function(){var e=this;this.fun.$get("plugin.video-demand.api.video-course-goods.get-course-goods-detail",{goods_id:this.$route.query.id},"").then((function(t){if(1==t.result)if(0==t.data.has_one_goods.status)e.$message.error("该课程已下架!");else{e.courseData=t.data,e.chapterdigList=e.courseData.has_many_dig_chapter;var o="",r=0,d=e.courseData.has_many_dig_chapter;if(e.chapter_id){for(var n=0;n<d.length;n++)if(d[n].has_many_chapter.length>0)for(var i=0;i<d[n].has_many_chapter.length;i++)d[n].has_many_chapter[i].id===Number(e.chapter_id)&&(o=d[n].has_many_chapter[i],r=i,e.courseActiveNames.push(d[n].id))}else{if(!(d.length>=1))return void e.$message.error("该课程还没上传视频");o=d[0].has_many_chapter[0],e.courseActiveNames.push(d[0].id)}switch(e.chapter_id=o.id,t.data.watch){case 0:case 2:case 3:e.is_buy=!1,e.videoInit(r,o);break;case 1:if(1==o.is_audition){e.is_buy=!1,e.videoInit(r,o);break}if(0==o.is_audition){e.$message.error("请升级会员或者购买课程"),e.is_buy=!0;break}}}else e.$message.error(t.msg)}),(function(e){console.log(e)}))},videoInit:function(e,t){this.is_vshow=!0,this.viewPermission(t.id,e,t.course_id,t.is_audition)},viewPermission:function(e,t,o,r){var d=this;this.vedioSrc="",this.is_vshow=!1,this.chapter_id=e;var param={goods_id:this.$route.query.id,chapter_id:e};this.fun.$get("plugin.video-demand.api.video-course-goods.get-video-address",param).then((function(n){1==n.result?d.viewType(n.data.watch,t,n.data.video_address,o,e,r,n.data.video_cover_address,n.data.is_try,n.data.try_time):console.log(n.msg)})).catch((function(e){console.log(e)}))},viewType:function(e,t,address,o,r,d,n,c,l){if(1==c&&1==e&&1==d)return this.is_buy=!1,void this.videoPlay(t,address,o,r,n);if(2!=e&&3!=e&&1==c&&l>0)return this.is_buy=!1,this.videoPlay(t,address,o,r,n),void(this.is_try_time=Number(l));switch(e){case 0:this.$message.error("请升级会员或者购买课程"),this.is_buy=!0;break;case 1:if(1==d){this.is_buy=!1,this.videoPlay(t,address,o,r,n);break}if(0==d){this.$message.error("请升级会员或者购买课程"),this.is_buy=!0;break}break;case 2:case 3:this.is_buy=!1,this.videoPlay(t,address,o,r,n)}},videoPlay:function(e,t,o,r,d){if(this.is_vshow=!0,this.vedioSrc="",this.options.cover=d,this.vedioSrc=t,!this.isMp4(this.vedioSrc))return this.vedioSrc="",this.is_vshow=!1,void this.$message.error("该章节视频链接有问题请更换");this.fun.$get("plugin.video-demand.api.video-demand-member.set-watch-history",{course_id:o,chapter_id:r})},isMp4:function(e){return!!(e.endsWith(".mp4")||e.endsWith(".mpeg")||e.endsWith(".wmv")||e.endsWith(".mov")||e.endsWith(".rmvb")||e.endsWith(".avi"))}}},l=c,h=(o(929),o(1)),component=Object(h.a)(l,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"course-detail"},[o("div",{staticClass:"course-top"},[o("span",{staticStyle:{width:"55px",cursor:"pointer"},on:{click:function(t){return e.toUrl("goods-id",{id:e.goods_id})}}},[e._v("< 返回")]),e._v(" "),e.courseData.has_one_goods?o("span",{staticClass:"lesson-title overflow-hide"},[e._v(e._s(e.courseData.has_one_goods.title))]):e._e()]),e._v(" "),o("client-only",[o("div",{staticClass:"course-bottom"},[o("div",{staticClass:"course-left"},[o("div",{staticClass:"video-box"},[o("vue-aliplayer-v2",{directives:[{name:"show",rawName:"v-show",value:e.is_vshow&&!e.is_buy,expression:"is_vshow && !is_buy"}],ref:"VueAliplayerV2",attrs:{source:e.vedioSrc,options:e.options},on:{timeupdate:e.timeupdate}}),e._v(" "),e.basicSet.is_login?e._e():o("div",{staticClass:"noLogin"},[o("div",{staticClass:"middle"},[o("p",[e._v("抱歉,登录后才可以观看")]),e._v(" "),o("div",{staticClass:"login",on:{click:function(t){return e.toUrl("login")}}},[e._v("现在登录")])])]),e._v(" "),e.basicSet.is_login&&e.is_buy?o("div",{staticClass:"noLogin"},[o("div",{staticClass:"middle"},[o("p",[e._v("抱歉,您目前没有权限观看,请升级会员或单次购买")]),e._v(" "),o("div",{staticClass:"login",on:{click:e.toGoods}},[e._v("现在购买")])])]):e._e(),e._v(" "),e.basicSet.is_login&&e.courseData.has_one_goods&&0==e.courseData.has_one_goods.status?o("div",{staticClass:"noLogin"},[o("div",{staticClass:"middle"},[o("p",[e._v("抱歉,该课程已下架!")]),e._v(" "),o("div",{staticClass:"login",on:{click:function(t){return e.toUrl("home")}}},[e._v("返回首页")])])]):e._e()],1)]),e._v(" "),o("div",{staticClass:"course-right"},[e.courseData.has_one_lecturer?o("div",{staticClass:"teacher-box"},[o("img",{staticClass:"teacher-img",attrs:{src:e.courseData.has_one_lecturer.has_one_member.avatar,alt:""}}),e._v(" "),o("span",[e._v(e._s(e.courseData.has_one_lecturer.real_name))])]):e._e(),e._v(" "),o("div",{staticClass:"collapse-box",on:{click:function(e){e.stopPropagation()}}},[o("el-collapse",{model:{value:e.courseActiveNames,callback:function(t){e.courseActiveNames=t},expression:"courseActiveNames"}},e._l(e.chapterdigList,(function(t,r){return o("el-collapse-item",{key:r,attrs:{title:t.chapter_name,name:t.id}},e._l(t.has_many_chapter,(function(t,r){return o("div",{staticClass:"chapter_box flex",on:{click:function(o){return o.stopPropagation(),e.viewPermission(t.id,r,t.course_id,t.is_audition)}}},[o("span",{staticClass:"chapter-title",class:{active:e.chapter_id==t.id}},[o("i",{staticClass:"iconfont icon-fontclass-bofang"}),e._v("第"+e._s(r+1)+"节: "+e._s(t.chapter_name))]),e._v(" "),0==!t.is_audition?o("span",{staticStyle:{"margin-left":"2px",color:"#fc9211"}},[e._v("免费")]):e._e()])})),0)})),1)],1)])])])],1)}),[],!1,null,"ded75b66",null);t.default=component.exports},817:function(e,t,o){var content=o(930);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(8).default)("5ef441fa",content,!0,{sourceMap:!1})},929:function(e,t,o){"use strict";o(817)},930:function(e,t,o){var r=o(7)(!1);r.push([e.i,".col_red[data-v-ded75b66]{color:#f11111}.col_green[data-v-ded75b66]{color:#44be95}.col_white[data-v-ded75b66]{color:#fff}.flex-col[data-v-ded75b66]{flex-direction:column}.flex-j-c[data-v-ded75b66]{justify-content:center}.flex-j-sb[data-v-ded75b66]{justify-content:space-between}.flex-j-ar[data-v-ded75b66]{justify-content:space-around}.flex-a-c[data-v-ded75b66]{align-items:center}.flex-a-e[data-v-ded75b66]{align-items:flex-end}.w[data-v-ded75b66]{width:1200px}.m-auto[data-v-ded75b66]{margin:0 auto}.height-one[data-v-ded75b66]{height:100%}.flex[data-v-ded75b66]{display:flex}.text-overflow[data-v-ded75b66]{-webkit-line-clamp:4}.text-overflow[data-v-ded75b66],.text-overflow-2[data-v-ded75b66]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.text-overflow-2[data-v-ded75b66]{-webkit-line-clamp:2}.text-overflow-3[data-v-ded75b66]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.overflow-hide[data-v-ded75b66],.text-overflow-3[data-v-ded75b66]{overflow:hidden;text-overflow:ellipsis}.overflow-hide[data-v-ded75b66]{white-space:nowrap}.hiddenScroll[data-v-ded75b66]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll}.hiddenScroll[data-v-ded75b66]::-webkit-scrollbar{display:none}.finger-point[data-v-ded75b66]{cursor:pointer}.cursor-default[data-v-ded75b66]{cursor:default}.el-icon-circle-close[data-v-ded75b66]{color:#fff}.course-detail[data-v-ded75b66]{background-color:#000;color:#fff;height:101vh}.course-top[data-v-ded75b66]{padding:0 20px;height:50px;line-height:50px;display:flex;background-color:#0f0f0f}.course-top .lesson-title[data-v-ded75b66]{display:inline-block;font-weight:700;font-size:18px;margin-left:20px}.course-bottom[data-v-ded75b66]{position:absolute;top:55px;left:0;width:100%;height:calc(100% - 50px)}.course-left[data-v-ded75b66]{position:absolute;right:360px;top:0;width:calc(100% - 360px);height:calc(100vh - 60px)}.course-left .video-box[data-v-ded75b66]{position:absolute;top:0;left:0;width:100%;height:calc(100vh - 50px)}.course-left .noLogin[data-v-ded75b66]{background-color:rgba(0,0,0,.5);position:absolute;width:100%;height:100%;top:0;left:0;z-index:1001}.course-left .noLogin .middle[data-v-ded75b66]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.course-left .noLogin .login[data-v-ded75b66]{font-size:18px;cursor:pointer;margin:20px auto 0;width:140px;text-align:center;background-color:var(--color);padding:10px;border-radius:8px}.course-right[data-v-ded75b66]{position:absolute;right:0;top:0;height:100%;width:360px;background-color:#0f0f0f;display:flex;flex-direction:column}.course-right .teacher-box[data-v-ded75b66]{display:flex;align-items:center;padding:10px 15px}.course-right .teacher-box .teacher-img[data-v-ded75b66]{width:40px;height:40px;border-radius:50%;margin-right:10px}.course-right .collapse-box[data-v-ded75b66]::-webkit-scrollbar{display:none}.course-right .collapse-box[data-v-ded75b66]{scrollbar-width:none;padding:10px 20px;overflow-y:scroll}.course-right .collapse-box[data-v-ded75b66] .el-collapse-item__header{background-color:#0f0f0f;padding:0 15px;margin:8px 0;height:auto;line-height:24px;min-height:48px;color:#fff}.course-right .collapse-box[data-v-ded75b66] .el-collapse{border-top:none;border-bottom:none}.course-right .collapse-box[data-v-ded75b66] .el-collapse-item__content{background-color:#0f0f0f;padding:5px 0}.course-right .collapse-box .chapter_box[data-v-ded75b66]{align-items:center;margin:6px 10px;padding:5px 20px;background-color:#fff}.course-right .collapse-box .chapter-title[data-v-ded75b66]{flex:1;cursor:pointer}.course-right .collapse-box .chapter-title.active[data-v-ded75b66]{color:#2486e9}.course-right .collapse-box .icon-fontclass-bofang[data-v-ded75b66]{margin-right:8px}",""]),e.exports=r}}]);