(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{300:function(e,t,i){"use strict";i.r(t);var n=i(489),s=i(420);for(var a in s)"default"!==a&&function(e){i.d(t,e,function(){return s[e]})}(a);i(474),i(475);var r=i(0),o=Object(r.a)(s.default,n.a,n.b,!1,null,"f90fdbf4",null);t.default=o.exports},420:function(e,t,i){"use strict";i.r(t);var n=i(421),s=i.n(n);for(var a in n)"default"!==a&&function(e){i.d(t,e,function(){return n[e]})}(a);t.default=s.a},421:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,s=i(48),a=(n=s)&&n.__esModule?n:{default:n};t.default={data:function(){return{name:window.G.UserInfo&&window.G.UserInfo.student_info&&window.G.UserInfo.student_info.personal_name||"匿名",latest:"",obj:[],loading:null}},metaInfo:function(){return{title:"清华大学五道口金融学院",meta:[]}},mounted:function(){var e=this;this.loading=this.$loading({lock:!0,text:"",spinner:"",background:"rgba(255, 255, 255, 0.9)"}),this.dealRender(),e.getNewLiveMsg(),e.getLiveLis(),setInterval(function(){e.getNewLiveMsg(),e.getLiveLis()},3e3)},methods:{goOutLogin:function(){var t=this;a.default.loginAction.outLogin().then(function(e){/^login/gi.test(e)&&(window.G.UserInfo={},window.location.href="https://pbcsf.ezijing.com/login/index")}).catch(function(e){t.$message.error(e.message)})},getNewLiveMsg:function(){var t=this,i=this;a.default.chapterAction.getNewLiveMsg().then(function(e){200===e.status&&(i.latest=e.data,window.console.log(i.latest)),i.loading&&(i.loading.close(),i.loading=null)}).catch(function(e){t.$message.error(e.message)}).finally(function(){})},getLiveLis:function(){var t=this,i=this;a.default.chapterAction.getLiveList().then(function(e){200===e.status&&(e.data.map(function(e,t,i){if(e.live&&(e.live.length||e.live.user_id)){var n=e.live.start_time,s=e.live.live_status,a=e.live.enable_record,r="";switch(s){case 0:r="直播未开始";break;case 1:r="正在直播";break;case 2:r="直播结束";break;case 101:case 102:r="直播结束，视频剪辑中";break;case 103:r="观看回放";break;default:r="直播未开始"}if(103!==s||a||(r=""),0===s&&n){n=n.replace(/-/g,"/");var o=(new Date(n).getTime()-(new Date).getTime())/1e3;r=o<=300?"即将开始":o<=3600?parseInt(o/60)+"分钟后开始":o<=86400?parseInt(o/3600)+"小时"+parseInt(o/60%60)+"分钟后开始":parseInt(o/86400)+"天后开始"}e.live.time=r}return e}),i.obj=e.data),i.loading&&(i.loading.close(),i.loading=null)}).catch(function(e){t.$message.error(e.message)}).finally(function(){})},dealRender:function(){var e,t,i,n;e=window,t=document,n=0<e.screen.width&&(e.innerWidth>=e.screen.width||0===e.innerWidth)?e.screen.width:e.innerWidth,i=(640<n?640:n)/375*100,t.documentElement.style.fontSize=i+"px"},opencc:function(e){var t=e.live;if(t&&t.user_id){var i=t.user_id,n=t.room_id,s=t.viewer_token,a=t.record_id,r=t.live_status,o=t.enable_record,c=this.name,l="https://view.csslcloud.net/api/view";if(a&&103===r){if(!o)return void this.$message.warning("该直播没有回放");l=l+"/callback?autoLogin=true&roomid="+n+"&userid="+i+"&recordid="+a+"&viewername="+c+"&viewertoken="+s}else l=l+"/index?autoLogin=true&roomid="+n+"&userid="+i+"&viewername="+c+"&viewertoken="+s;window.console.log(l),window.open(l,"_blank")}else this.$message.error("网络错误，刷新重试")}}}},422:function(e,t,i){},423:function(e,t,i){},474:function(e,t,i){"use strict";var n=i(422);i.n(n).a},475:function(e,t,i){"use strict";var n=i(423);i.n(n).a},489:function(e,t,s){"use strict";function i(){var i=this,e=i.$createElement,n=i._self._c||e;return n("div",{staticClass:"pages"},[n("div",{staticClass:"head"},[n("img",{staticClass:"logo5",attrs:{alt:"logo",src:s(126)}}),i._v(" "),n("div",{staticClass:"userinfo"},[n("div",{staticClass:"login-out",on:{click:function(e){return i.goOutLogin()}}},[i._v("退出")]),i._v(" "),n("div",{staticClass:"name"},[i._v(i._s(i.name))])])]),i._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:i.latest&&i.latest.live,expression:"latest && latest.live"}],staticClass:"hint",on:{click:function(e){return i.opencc(i.latest)}}},[n("div",{staticClass:"left"},[n("div",{staticClass:"left-1"},[i._v("直播提醒")]),i._v(" "),n("div",{staticClass:"left-2"},[i._v("《"+i._s(i.latest.course_name)+"》将于 "+i._s(i.latest.live&&i.latest.live.start_time.slice(5))+" 开始")])]),i._v(" "),n("div",{staticClass:"right"},[i._v("进入直播 >")])]),i._v(" "),n("div",{staticClass:"tips"},[i._v("提示语：已参加的课程请到电脑端学习系统观看回放")]),i._v(" "),n("div",{staticClass:"list-box"},i._l(i.obj,function(t,e){return n("div",{key:e,staticClass:"curriculum"},[n("h4",{staticClass:"curriculum-name"},[i._v(i._s(t.course_name))]),i._v(" "),n("div",{staticClass:"curriculum-box",on:{click:function(e){return i.opencc(t)}}},[n("img",{staticClass:"curriculum-picture",attrs:{src:t.curriculum.curriculum_picture}}),i._v(" "),n("div",{staticClass:"curriculum-introduce"},[n("div",{staticClass:"title"},[i._v(i._s(t.curriculum.curriculum_name))]),i._v(" "),n("div",{staticClass:"time"},[i._v(i._s(t.live?t.live.time:""))])])])])}),0)])}var n=[];s.d(t,"a",function(){return i}),s.d(t,"b",function(){return n})}}]);