ClassDetail.7295b76e.js 8.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ClassDetail"],{"25ce":function(t,e,a){"use strict";var n=a("5d00"),i=a.n(n);i.a},"38f0":function(t,e,a){"use strict";var n=a("5b7e"),i=a.n(n);i.a},"5a3f":function(t,e,a){t.exports=a.p+"img/icon_teacher.de517191.png"},"5b7e":function(t,e,a){},"5d00":function(t,e,a){},"6e6e":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mheader",style:{height:"calc("+t.titleHeight+"px + "+t.navBarHeight+"px)"}},[a("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""],style:[t.headStyle]},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[a("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),a("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),a("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},i=[],s=a("a34a"),r=a.n(s),o=a("ddf4");function c(t,e,a,n,i,s,r){try{var o=t[s](r),c=o.value}catch(u){return void a(u)}o.done?e(c):Promise.resolve(c).then(n,i)}function u(t){return function(){var e=this,a=arguments;return new Promise(function(n,i){var s=t.apply(e,a);function r(t){c(s,n,i,r,o,"next",t)}function o(t){c(s,n,i,r,o,"throw",t)}r(void 0)})}}var l={name:"mheader",props:{name:String,isNative:{type:Boolean,default:!0},isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},data:function(){return{navBarHeight:0,headStyle:{},titleHeight:44}},mounted:function(){this.isNative||(Object(o["b"])({api:"setBarStatus",content:{status:0}}),this.getNav(),this.isBack=!1)},methods:{getNav:function(){var t=u(r.a.mark(function t(){var e,a,n=this;return r.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(e=sessionStorage.getItem("navHeight"),a=sessionStorage.getItem("titleHeight"),!e||!a){t.next=7;break}this.navBarHeight=e,this.headStyle={paddingTop:e+"px",height:a+"px",lineHeight:a+"px"},t.next=9;break;case 7:return t.next=9,Object(o["b"])({api:"getNavHeight"},function(t){var e=t.content,a={},i=e.dpi||2;if(e.navHeight){var s=e.navHeight/i;sessionStorage.setItem("navHeight",s),n.navBarHeight=s,a={paddingTop:s+"px"}}if(e.titleHeight){var r=e.titleHeight/i;sessionStorage.setItem("titleHeight",r),n.titleHeight=r,a.height=r+"px",a.lineHeight=r+"px"}n.headStyle=a});case 9:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}},beforeDestroy:function(){this.isNative||(Object(o["b"])({api:"setBarStatus",content:{status:1}}),this.isBack=!0)}},d=l,f=(a("38f0"),a("2877")),h=Object(f["a"])(d,n,i,!1,null,"6a74717c",null);e["a"]=h.exports},7293:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"classdetail"},[n("MHeader",{attrs:{isBack:!1}}),n("div",{staticClass:"header van-hairline--bottom"},[n("h3",[t._v(t._s(t.dataInfo.groupName))]),n("p",[t._v(t._s(t._f("getMonthDay")(t.dataInfo.courseStartDate))+"—"+t._s(t._f("getMonthDay")(t.dataInfo.courseEndDate)))])]),n("div",{staticClass:"teahcerInfo van-hairline--bottom"},[n("div",{staticClass:"logo"},[t.dataInfo.avatar?n("img",{attrs:{src:t.dataInfo.avatar,alt:""}}):n("img",{attrs:{src:a("5a3f"),alt:""}})]),n("div",{staticClass:"info"},[n("p",{staticClass:"name van-ellipsis"},[t._v(t._s(t.dataInfo.teacherName))]),n("p",{staticClass:"memo van-multi-ellipsis--l2"},[t._v("简介:"+t._s(t.dataInfo.introduction))]),n("p",{staticClass:"times"},[t._v("授课次数:"+t._s(t.dataInfo.lectureNum?t.dataInfo.lectureNum:0)+"次")])])]),n("div",{staticClass:"classdetails"},[n("h3",[t._v("课时安排")]),n("p",{staticClass:"detail"},[n("i",{staticClass:"books"}),n("span",[t._v("总计:"+t._s(t.dataInfo.totalClassesTimes)+"节")])]),n("div",{staticClass:"detaillist"},t._l(t.courseList,function(e,a){return n("div",{key:a,staticClass:"detailitem"},[n("span",{staticClass:"time"},[t._v("第"+t._s(++a)+"节")]),n("i",{staticClass:"icon_prossess"}),n("span",{staticClass:"content"},[t._v(t._s(t._f("getMonthDay")(e.classDate))+" "+t._s(t._f("getHourMinute")(e.startClassTime))+"-"+t._s(t._f("getHourMinute")(e.endClassTime))+" "+t._s("FINISH"==e.status?"(已结束)":""))])])}),0)]),n("div",{staticClass:"pay_btn",on:{click:t.onJoin}},[t._v("确认加入")])],1)},i=[],s=a("6e6e"),r=a("ff51"),o=a("b562"),c={name:"classdetail",components:{MHeader:s["a"]},data:function(){return{dataInfo:{},courseList:[]}},mounted:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),Object(r["b"])().android||Object(r["b"])().iPhone?document.title="课堂详情":this.headerStatus=!0,this.__init()},methods:{__init:function(){var t=this,e=this.$route.query;this.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(o["e"])({groupId:e.groupId}).then(function(a){var n=a.data;t.$toast.clear(),200==n.code?n.data&&(t.dataInfo=n.data,t.courseList=n.data.courseSchedules):403==n.code?t.$router.push({path:"/appLogin",query:{groupId:e.groupId}}):t.$toast(n.msg)})},onJoin:function(){var t=this,e=this.$route.query;this.$dialog.confirm({message:"确定加入课程?"}).then(function(){t.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(o["b"])({courseGroupId:e.groupId}).then(function(e){var a=e.data;t.$toast.clear(),200==a.code?t.$dialog.alert({message:"恭喜您已完成课程报名,<br />请关注课程时间,准时上课。"}).then(function(){t.checkUrl()?window.location.href="https://mstuonline.dayaedu.com/#/transfer":window.location.href="http://mstudev.dayaedu.com/#/transfer"}):302==a.code?(t.onSubmitStatus=!0,t.$dialog.alert({title:"课程冲突",message:a.msg,messageAlign:"left"}).then(function(){})):t.$toast(a.msg)})}).catch(function(){})},checkUrl:function(){var t=window.location.href;return!!/mteaonline/gi.test(t)}},filters:{getMonthDay:function(t){var e=t||new Date;"string"==typeof e&&(e=new Date(t.replace(/-/gi,"/")));var a=Object(r["h"])(e.getMonth()+1),n=Object(r["h"])(e.getDate());return a+"月"+n+"日"},getHourMinute:function(t){var e=t||new Date;"string"==typeof e&&(e=new Date(t.replace(/-/gi,"/")));var a=Object(r["h"])(e.getHours()),n=Object(r["h"])(e.getMinutes());return a+":"+n}}},u=c,l=(a("25ce"),a("2877")),d=Object(l["a"])(u,n,i,!1,null,"530ed001",null);e["default"]=d.exports},ddf4:function(t,e,a){"use strict";a.d(e,"b",function(){return f}),a.d(e,"a",function(){return h});var n=a("ff51");function i(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,n)}return a}function s(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?i(Object(a),!0).forEach(function(e){r(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var c=function(){},u={},l=Object(n["b"])();l.isApp&&window.addEventListener("message",function(t){try{var e=t.data?"object"===o(t.data)?t.data:JSON.parse(t.data):{},a=e.content.uuid||e.uuid;try{e.content&&(e.content=JSON.parse(e.content))}catch(v){}if(!a){var n=Object.keys(u).filter(function(t){return 0===t.indexOf(e.api)}),i=!0,s=!1,r=void 0;try{for(var l,d=n[Symbol.iterator]();!(i=(l=d.next()).done);i=!0){var f=l.value,h=u[f]||c;h(e)}}catch(g){s=!0,r=g}finally{try{i||null==d.return||d.return()}finally{if(s)throw r}}return}var p=u[e.content.uuid||e.uuid||e.api+e.uuid]||c;p(e)}catch(v){console.error("通信消息解析错误",v)}});var d=window.DAYA||window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.DAYA,f=function(t,e){if(l.isApp){var a=Object(n["g"])();u[a]=e||c,t.content=t.content?s({},t.content,{uuid:a}):{uuid:a},d.postMessage(JSON.stringify(t))}},h=function(t,e){if(l.isApp){var a=t+Object(n["g"])();u[a]=e||c}}}}]);