ClassDetail.435c880d.js 5.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ClassDetail"],{"3ad6":function(t,a,e){"use strict";e("cdbd")},"5a3f":function(t,a,e){t.exports=e.p+"img/icon_teacher.de517191.png"},"6e6e":function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"mheader"},[e("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[e("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),e("div",{staticClass:"m-nav-bar__title"},[t._t("default",(function(){return[t._v(t._s(t.name?t.name:t.$route.meta.descrition))]}))],2),e("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},i=[],n={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{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)}}},o=n,r=(e("70bb"),e("2877")),c=Object(r["a"])(o,s,i,!1,null,"10a70108",null);a["a"]=c.exports},"70bb":function(t,a,e){"use strict";e("c905")},7293:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"classdetail"},[s("MHeader",{attrs:{isBack:!1}}),s("div",{staticClass:"header van-hairline--bottom"},[s("h3",[t._v(t._s(t.dataInfo.groupName))]),s("p",[t._v(t._s(t._f("getMonthDay")(t.dataInfo.courseStartDate))+"—"+t._s(t._f("getMonthDay")(t.dataInfo.courseEndDate)))])]),s("div",{staticClass:"teahcerInfo van-hairline--bottom"},[s("div",{staticClass:"logo"},[t.dataInfo.avatar?s("img",{attrs:{src:t.dataInfo.avatar,alt:""}}):s("img",{attrs:{src:e("5a3f"),alt:""}})]),s("div",{staticClass:"info"},[s("p",{staticClass:"name van-ellipsis"},[t._v(t._s(t.dataInfo.teacherName))]),s("p",{staticClass:"memo van-multi-ellipsis--l2"},[t._v("简介:"+t._s(t.dataInfo.introduction))]),s("p",{staticClass:"times"},[t._v("授课次数:"+t._s(t.dataInfo.lectureNum?t.dataInfo.lectureNum:0)+"次")])])]),s("div",{staticClass:"classdetails"},[s("h3",[t._v("课时安排")]),s("p",{staticClass:"detail"},[s("i",{staticClass:"books"}),s("span",[t._v("总计:"+t._s(t.dataInfo.totalClassesTimes)+"节")])]),s("div",{staticClass:"detaillist"},t._l(t.courseList,(function(a,e){return s("div",{key:e,staticClass:"detailitem"},[s("span",{staticClass:"time"},[t._v("第"+t._s(++e)+"节")]),s("i",{staticClass:"icon_prossess"}),s("span",{staticClass:"content"},[t._v(t._s(t._f("getMonthDay")(a.classDate))+" "+t._s(t._f("getHourMinute")(a.startClassTime))+"-"+t._s(t._f("getHourMinute")(a.endClassTime))+" "+t._s("FINISH"==a.status?"(已结束)":""))])])})),0)]),s("div",{staticClass:"pay_btn",on:{click:t.onJoin}},[t._v("确认加入")])],1)},i=[],n=e("6e6e"),o=e("ff51"),r=e("b562"),c={name:"classdetail",components:{MHeader:n["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(o["b"])().android||Object(o["b"])().iPhone?document.title="课堂详情":this.headerStatus=!0,this.__init()},methods:{__init:function(){var t=this,a=this.$route.query;this.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(r["e"])({groupId:a.groupId}).then((function(e){var s=e.data;t.$toast.clear(),200==s.code?s.data&&(t.dataInfo=s.data,t.courseList=s.data.courseSchedules):403==s.code?t.$router.push({path:"/appLogin",query:{groupId:a.groupId}}):t.$toast(s.msg)}))},onJoin:function(){var t=this,a=this.$route.query;this.$dialog.confirm({message:"确定加入课程?"}).then((function(){t.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(r["b"])({courseGroupId:a.groupId}).then((function(a){var e=a.data;t.$toast.clear(),200==e.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==e.code?(t.onSubmitStatus=!0,t.$dialog.alert({title:"课程冲突",message:e.msg,messageAlign:"left"}).then((function(){}))):t.$toast(e.msg)}))})).catch((function(){}))},checkUrl:function(){var t=window.location.href;return!!/mteaonline/gi.test(t)}},filters:{getMonthDay:function(t){var a=t||new Date;"string"==typeof a&&(a=new Date(t.replace(/-/gi,"/")));var e=Object(o["h"])(a.getMonth()+1),s=Object(o["h"])(a.getDate());return e+"月"+s+"日"},getHourMinute:function(t){var a=t||new Date;"string"==typeof a&&(a=new Date(t.replace(/-/gi,"/")));var e=Object(o["h"])(a.getHours()),s=Object(o["h"])(a.getMinutes());return e+":"+s}}},l=c,u=(e("3ad6"),e("2877")),d=Object(u["a"])(l,s,i,!1,null,"7811dc08",null);a["default"]=d.exports},c905:function(t,a,e){},cdbd:function(t,a,e){}}]);