4.9b4273e2373de1994bc8.js 17 KB
webpackJsonp([4],{"+wl/":function(t,s,e){t.exports=e.p+"static/img/nextUnit.f575be1.png"},"3QU7":function(t,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var i=e("mvHQ"),n=e.n(i),o=e("CCn6"),r=e("hUWd"),a=e.n(r),c=e("SKwj"),l=e.n(c),u=e("ohH1"),d=e.n(u),_=e("WcTT"),p=e.n(_),h=e("qmiW"),v=e.n(h),g={name:"guide",data:function(){return{iKnowUrl:a.a,goDownUrl:d.a,unit:0==this.$route.query.course_type,goUrl:l.a,starUrl:p.a,mapUrl:v.a,show:!1}},mounted:function(){var t=this;Object(o.j)({page_name:"map"}).then(function(s){0==s&&(t.show=!0)})}},m={render:function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t.show?e("div",{staticClass:"guide",on:{click:function(s){t.show=!1}}},[t.unit?e("div",{staticClass:"Unit"},[t._v("\n      Unit\n      "),e("br"),t._v("\n      我家农场\n    ")]):t._e(),t._v(" "),t.unit?e("img",{class:{toUntil:!0,"unit-no":!t.unit},attrs:{src:t.goUrl}}):t._e(),t._v(" "),t.unit?e("div",{class:{"until-test":!0,"unit-no":!t.unit}},[t._v("\n      点击这里可以"),e("span",{staticClass:"color-red"},[t._v("切换主题")])]):t._e(),t._v(" "),e("img",{class:{toLesson:!0,"unit-no":!t.unit},attrs:{src:t.goUrl}}),t._v(" "),e("div",{class:{"lesson-text":!0,"unit-no":!t.unit}},[t._v("点击这里可以"),e("span",{staticClass:"color-red"},[t._v("选择课程")])]),t._v(" "),e("div",{class:{"lesson-block":!0,"unit-no":!t.unit}},[e("img",{attrs:{src:t.mapUrl}})]),t._v(" "),e("img",{class:{"i-know":!0,"unit-no":!t.unit},attrs:{src:t.iKnowUrl},on:{click:function(s){t.show=!1}}})]):t._e()])},staticRenderFns:[]};var A=e("VU/8")(g,m,!1,function(t){e("d0xp")},"data-v-3e4ce8ee",null).exports,y={name:"guide",data:function(){return{iKnowUrl:a.a,goDownUrl:d.a,goUrl:l.a,starUrl:p.a,show:!1}},mounted:function(){var t=this;Object(o.j)({page_name:"content"}).then(function(s){0==s&&(t.show=!0)})}},f={render:function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t.show?e("div",{staticClass:"guide",on:{click:function(s){t.show=!1}}},[e("div",{staticClass:"guide-content"},[e("div",{staticClass:"title"},[t._v("\n        The Bear Went Over the Mountain\n      ")]),t._v(" "),e("img",{staticClass:"toTitle",attrs:{src:t.goDownUrl}}),t._v(" "),t._m(0),t._v(" "),e("img",{staticClass:"toLesson",attrs:{src:t.goUrl}}),t._v(" "),t._m(1),t._v(" "),e("div",{staticClass:"lesson-block"},[t._v("\n        开始课程\n      ")]),t._v(" "),e("img",{staticClass:"i-know",attrs:{src:t.iKnowUrl},on:{click:function(s){t.show=!1}}})])]):t._e()])},staticRenderFns:[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"title-test"},[this._v("\n        该天"),s("span",{staticClass:"color-red"},[this._v("歌曲名称")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"lesson-text"},[this._v("点击"),s("span",{staticClass:"color-red"},[this._v("开始课程")])])}]};var w=e("VU/8")(y,f,!1,function(t){e("FmjP")},"data-v-429fecf6",null).exports,L=e("e2Pt"),C=e.n(L),U=(e("v2ns"),e("7QTg")),D=e("Au9i"),b=e("2oJL"),k=e("3xxH"),T=e.n(k),S=e("+wl/"),I=e.n(S),x=e("C7S0"),E=e.n(x),q={name:"mapDefault",components:{swiper:U.swiper,swiperSlide:U.swiperSlide,bottomTab:b.a,guidePage:A,guideContent:w},data:function(){var t=this;return{shopType:this.$route.query.course_type,diaBGI:C.a,goodsID:"",themeName:"",course_id:"",push_time:"",course_name:"",nextUnitUrl:I.a,periods_id:this.$route.query.periods_id,parent_category_id:this.$route.query.parent_category_id,unitList:[],more:!1,errorURL:T.a,popupVisible:!1,lessonList:[],lesson:"",classID:"",noLesson:!1,nextToURL:E.a,hpLessonList:[],thisLesson:null,swiperOption:{width:.25*window.innerWidth,on:{slideChangeTransitionStart:function(){this.activeIndex>=t.swiper.slides.length-4&&t.more&&t.swiper.slidePrev()},resize:function(){this.params.width=.25*window.innerWidth,this.update(!0)}},pagination:{el:".swiper-pagination"}},swiperOption2:{slidesPerView:5,navigation:{nextEl:".banner-right",prevEl:".banner-left"},on:{slideChangeTransitionStart:function(){this.activeIndex==t.swiper2.slides.length-5&&t.more&&t.swiper2.slidePrev()}},pagination:{el:".swiper-pagination"}},swiperOptionLesson:{slidesPerView:"auto",spaceBetween:20}}},mounted:function(){this.initPage()},filters:{substr10:function(t){return t.substr(0,10)}},computed:{swiper:function(){return 0==this.$route.query.course_type?this.$refs.mySwiper.swiper:""},swiper2:function(){return 0==this.$route.query.course_type?this.$refs.mySwiper2.swiper:""},swiperLesson:function(){return this.$refs.mySwiperLesson.swiper},splitContent:function(){var t=[];return this.thisLesson.content.tips.title1_content&&(t=this.thisLesson.content.tips.title1_content.split("\n")),t}},methods:{findUnit:function(t){return this.unitList.find(function(s){return s.category_id==t})},dateParse:function(t){var s;return s=t.indexOf("-")>-1?t.split("-"):t.indexOf("/")>-1?t.split("/"):t.split("."),new Date(s[0],s[1]-1,s[2])},dateCompare:function(t){var s=(new Date).getTime(),e=t.getTime();return e>s?1:e==s?0:-1},goDetail:function(){if(this.$sa.track("StartCourse",{elementID:this.thisLesson.id.toString(),elementName:this.thisLesson.title,themeID:this.parent_category_id,themeName:this.themeName,goodsID:this.goodsID,classID:this.classID,is_view_today:!!(new Date).setHours(0,0,0,0)===new Date(this.push_time).setHours(0,0,0,0)}),this.thisLesson.content.tips){var t={periods_id:this.periods_id,category_id:this.thisLesson.categoryId,elementId:this.thisLesson.id,course_type:this.$route.query.course_type,parent_category_id:this.parent_category_id},s=JSON.parse(n()(this.thisLesson));s.push_time=this.push_time,s.themeID=this.parent_category_id,s.themeName=this.themeName,s.goodsID=this.goodsID,s.classID=this.classID,localStorage.setItem("lessonDetail",n()(s)),this.$router.push({name:"newLesson",query:t})}else{var e={periods_id:this.periods_id,category_id:this.thisLesson.category_id,parent_category_id:this.parent_category_id,element_id:this.thisLesson.id,course_type:this.$route.query.course_type,type:"1"};this.$router.push({name:"lesson",query:e})}},changeCateGory:function(t,s){this.themeName=t.category_name.toString(),this.$sa.track("selectCategory",{themeID:t.category_id.toString(),themeName:t.category_name.toString(),courseID:this.course_id.toString(),goodsID:this.goodsID,classID:this.classID}),s||(this.parent_category_id=t.category_id,this.$router.push({name:"map",query:{periods_id:this.periods_id,course_type:this.shopType,parent_category_id:this.parent_category_id}}),this.getLessonList(!0))},showDia:function(t,s){var e=this;"0000-00-00"!==t.push_time?Object(o.m)(this.periods_id,t.id,t.ele_id).then(function(i){i.content=JSON.parse(i.content),e.thisLesson=i,e.thisLesson.id=t.ele_id.toString(),e.thisLesson.categoryId=t.id,e.thisLesson.domTitle=t.name,e.thisLesson.day=s,e.popupVisible=!0,e.push_time=t.push_time,e.$sa.track("selectElement",{elementID:t.ele_id.toString(),elementName:t.name.toString(),themeID:e.parent_category_id.toString(),themeName:e.parent_category_id.toString(),goodsID:e.goodsID,classID:e.classID,courseID:e.course_id.toString()})}):Object(D.Toast)("课程还未开始哦")},initPage:function(){this.getLessonList(),0==this.$route.query.course_type&&this.getUnitList()},getUnitList:function(){var t=this;Object(o.f)(this.periods_id).then(function(s){t.unitList=[],s.forEach(function(s){1!==s.status&&2!==s.status||t.unitList.push(s)}),s.find(function(t){return 0===t.status})&&(t.more=!0),t.$nextTick(function(){var s=null,e=null;t.unitList.forEach(function(i,n){i.category_id==t.parent_category_id&&(t.themeName=i.category_name,s=n>=3?n-3:0,e=n>=4?n-4:0)}),t.swiper.slideTo(s,800,!1),t.swiper2.slideTo(e,800,!1)})})},getLessonList:function(t){var s=this;Object(o.n)(this.periods_id+"/v2",{category_id:this.parent_category_id}).then(function(e){s.course_id!==e.periods_info.course_id&&(s.course_id=e.periods_info.course_id,s.course_name=e.periods_info.title,s.goodsID=e.periods_info.goods_id,s.classID=e.periods_info.class_id,s.$sa.track("EnterCourse",{goodsID:e.periods_info.goods_id,classID:e.periods_info.class_id})),s.lessonList=[],s.hpLessonList=[],s.noLesson=!!e.list.length<1;for(var i=[],n=0,o=0;o<e.list.length;o++)"0000-00-00"!==e.list[o].push_time&&n++,e.list[o].name.indexOf("Day1")>-1&&i.length>0?(s.lessonList.push(i),(i=[]).push(e.list[o])):(i.push(e.list[o]),o==e.list.length-1&&s.lessonList.push(i)),e.list[o].dayText="DAY "+i.length,s.hpLessonList.push(e.list[o]);t?(s.scroll_to(0),s.swiperLesson.slideTo(0)):s.$nextTick(function(){if(n!==s.hpLessonList.length?s.swiperLesson.slideTo(n-1):s.$route.query.category_id,s.$route.query.category_id){var t=document.getElementsByClassName("cid"+s.$route.query.category_id);if(t.length>0&&"none"!==t[0].style.display){s.scroll_to(t[0].offsetTop);var e=null,i=0;s.lessonList.forEach(function(t){t.forEach(function(t,n){t.id==s.$route.query.category_id&&(e=t,i=n+1)})}),s.showDia(e,i)}}else if(s.$route.query.back_id){var o=document.getElementsByClassName("cid"+s.$route.query.back_id);o.length>0&&"none"!==o[0].style.display&&s.scroll_to(o[0].offsetTop)}else{var r=document.getElementsByClassName("money");r.length>0&&0!==r[0].offsetLeft&&s.scroll_to(r[0].offsetParent.offsetTop)}})})},scroll_to:function(t){for(var s=t-200,e=function(t){var e=document.documentElement.scrollTop|document.body.scrollTop,i=e-s;setTimeout(function(){document.documentElement.scrollTop=e-i/30*t,document.body.scrollTop=e-i/30*t},10*t)},i=0;i<30;i++)e(i)}}},N={render:function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("div",{staticClass:"unit-block"},[0==t.$route.query.course_type?e("swiper",{ref:"mySwiper",staticClass:"banner",attrs:{options:t.swiperOption}},[t._l(t.unitList,function(s,i){return e("swiper-slide",{key:i},[e("div",{staticClass:"line"}),t._v(" "),e("div",{class:{"unit-li":!0,active:s.category_id==t.parent_category_id},on:{click:function(e){t.changeCateGory(s,s.category_id==t.parent_category_id)}}},[e("div",[e("img",{attrs:{src:s.category_cover}})]),t._v("\n          "+t._s(s.category_name)+"\n        ")])])}),t._v(" "),t.more?e("swiper-slide",[e("div",{staticClass:"line"}),t._v(" "),e("div",{staticClass:"unit-li"},[e("div",[e("img",{attrs:{src:t.nextUnitUrl}})]),t._v(" "),e("span",{staticStyle:{color:"#cccccc"}},[t._v("敬请期待")])])]):t._e(),t._v(" "),t._l(3-t.unitList.length>0?3-t.unitList.length:0,function(t){return e("swiper-slide",{key:10*t},[e("div",{staticClass:"unit-li"},[e("div")])])})],2):t._e(),t._v(" "),e("div",{staticClass:"btn-conntent banner-left"},[e("img",{attrs:{src:t.nextToURL}})]),t._v(" "),e("div",{staticClass:"btn-conntent banner-right"},[e("img",{attrs:{src:t.nextToURL}})]),t._v(" "),0==t.$route.query.course_type?e("swiper",{ref:"mySwiper2",staticClass:"banner2",attrs:{options:t.swiperOption2}},[t._l(t.unitList,function(s,i){return e("swiper-slide",{key:i},[e("div",{staticClass:"line"}),t._v(" "),e("div",{class:{"unit-li":!0,active:s.category_id==t.parent_category_id},on:{click:function(e){t.changeCateGory(s,s.category_id==t.parent_category_id)}}},[e("img",{attrs:{src:s.category_cover}}),t._v(" "),e("div",[t._v(t._s(s.category_name))])])])}),t._v(" "),t.more?e("swiper-slide",[e("div",{staticClass:"line"}),t._v(" "),e("div",{staticClass:"unit-li"},[e("div",[e("img",{attrs:{src:t.nextUnitUrl}})]),t._v(" "),e("span",{staticStyle:{color:"#cccccc"}},[t._v("敬请期待")])])]):t._e(),t._v(" "),t._l(6-t.unitList.length>0?6-t.unitList.length:0,function(t){return e("swiper-slide",{key:10*t},[e("div",{staticClass:"unit-li"},[e("div")])])})],2):t._e()],1),t._v(" "),e("div",{staticClass:"lesson-block"},[t.noLesson?e("div",{staticClass:"noLesson"},[e("img",{attrs:{src:t.errorURL}}),t._v(" "),e("div",[t._v("\n        暂无课程\n      ")])]):t._e(),t._v(" "),t._l(t.lessonList,function(s,i){return e("div",{staticClass:"card-block"},[e("img",{attrs:{src:s[0].cover+"?imageslim"}}),t._v(" "),t._l(s,function(n,o){return e("div",{class:"card-li cid"+n.id,on:{click:function(s){t.showDia(n,o+1)}}},[e("div",{staticClass:"text-block"},[e("div",{staticClass:"title"},[t._v("\n            "+t._s(t._f("substr10")(n.name))+"\n          ")]),t._v(" "),e("div",{staticClass:"tips"},["0000-00-00"!==n.push_time?e("span",[t._v(" 开课时间:"+t._s(n.push_time))]):t._e(),t._v(" "),"0000-00-00"===n.push_time?e("span",[t._v("课程还未开始哦")]):t._e()])]),t._v(" "),e("div"),t._v(" "),e("div",{staticClass:"icon-block"},[e("i",{class:{map:!0,right:i!==n.length-1&&"0000-00-00"!==n.push_time,money:"0000-00-00"!==n.push_time&&(s[o+1]&&"0000-00-00"===s[o+1].push_time||o===s.length-1&&t.lessonList[i+1]&&"0000-00-00"===t.lessonList[i+1][0].push_time||(0==t.$route.query.course_type&&t.findUnit(t.parent_category_id)&&2===t.findUnit(t.parent_category_id).status||1==t.$route.query.course_type)&&o===s.length-1&&i==t.lessonList.length-1),clock:"0000-00-00"===n.push_time}})])])})],2)})],2),t._v(" "),e("div",{staticClass:"lesson-block-hp"},[e("swiper",{ref:"mySwiperLesson",staticClass:"lesson-sw",attrs:{options:t.swiperOptionLesson}},t._l(t.hpLessonList,function(s,i){return e("swiper-slide",{key:i,staticStyle:{width:"50vh"}},[e("div",{staticClass:"lesson-content-hp",on:{click:function(e){t.showDia(s)}}},["0000-00-00"===s.push_time?e("div",{staticClass:"clock-hp"},[t._v("\n              等待开课\n            ")]):t._e(),t._v(" "),e("div",{staticClass:"lesson-day-hp"},[t._v(t._s(s.dayText))]),t._v(" "),e("div",{staticClass:"lesson-img-hp"},[e("img",{attrs:{src:s.cover}})]),t._v(" "),e("div",{staticClass:"lesson-name-hp"},[t._v("\n              "+t._s(s.sub_title)+"\n            ")]),t._v(" "),"0000-00-00"!==s.push_time&&(t.hpLessonList[i+1]&&"0000-00-00"===t.hpLessonList[i+1].push_time||(0==t.$route.query.course_type&&t.findUnit(t.parent_category_id)&&2===t.findUnit(t.parent_category_id).status||1==t.$route.query.course_type)&&i===t.hpLessonList.length-1)?e("i",{staticClass:"map money"}):t._e()])])}))],1),t._v(" "),t.popupVisible&&t.thisLesson?e("guide-content"):t._e(),t._v(" "),e("mt-popup",{staticStyle:{background:"transparent"},model:{value:t.popupVisible,callback:function(s){t.popupVisible=s},expression:"popupVisible"}},[t.thisLesson?e("div",{staticClass:"popup-block"},[e("i",{staticClass:"map close",on:{click:function(s){t.popupVisible=!1}}}),t._v(" "),e("div",{staticClass:"header",style:{backgroundImage:"url("+t.diaBGI+")"}},[e("div",{staticClass:"title"},[t._v("\n          "+t._s(t.thisLesson.title)+"\n        ")]),t._v(" "),t.thisLesson.content.tips?e("div",{staticClass:"tips"},[t._v("\n          "+t._s(t.thisLesson.content.tips.content)+"\n        ")]):t._e(),t._v(" "),t.thisLesson.content.tips?t._e():e("div",{staticClass:"tips"},[t._v("\n          DAY "+t._s(t.thisLesson.day)+"\n        ")])]),t._v(" "),t.thisLesson.content.tips?e("div",{staticClass:"content"},[e("div",{staticClass:"tips-title"},[t._v(t._s(t.thisLesson.content.tips.title1))]),t._v(" "),e("div",{staticClass:"title-content"},[e("ul",t._l(t.splitContent,function(s){return e("li",{staticStyle:{"text-align":"center"}},[t._v(t._s(s))])}))]),t._v(" "),e("div",{staticClass:"tips-title"},[t._v(t._s(t.thisLesson.content.tips.title2))]),t._v(" "),e("div",{staticClass:"title-content"},[t._v(t._s(t.thisLesson.content.tips.title2_content))])]):t._e(),t._v(" "),t.thisLesson.content.tips?t._e():e("div",{staticClass:"content"},[e("div",{staticStyle:{color:"#cccccc",padding:"21.3333vw 0","font-size":"5.3333vw"}},[t._v("快去开始课程吧!")])]),t._v(" "),e("div",[e("i",{staticClass:"map goLesson",on:{click:function(s){t.goDetail()}}})])]):t._e()]),t._v(" "),e("bottom-tab"),t._v(" "),e("guide-page")],1)},staticRenderFns:[]};var V=e("VU/8")(q,N,!1,function(t){e("xb+1")},"data-v-e885a828",null);s.default=V.exports},C7S0:function(t,s){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAdVBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////BwcE+Pj41NTVFRUXKysrY2NgICAhSUlL8/PwqKiqwsLBdXV2kpKRtbW3n5+e6urqpqalBKlUFAAAAFHRSTlMA6B3ee4jvEQj0+m+WozBjuEZZxTO85BMAAAC2SURBVCjPdZHpEoIwEINLuW/BLCAgh4rv/4gu50yh5ueXyU6bCHGVFxrINNgygPsFu5YDVqbDZYnbCdszLj4tEhX7wKMgeisBueCaiJSAjBg/ZzwHYh2mpg2SHQeMG9o07oGY8XhgahDI1eArVX1wesE8v3JV1yNV/nVYHPFOTUx7JDyXVC3WAMNT++O2q4GdCtZ1H7a6CY6rmQ79t4StWdUEWviuZtmULU1ks3wptMrNSPxR/gMRnxN19gX44AAAAABJRU5ErkJggg=="},FmjP:function(t,s){},WcTT:function(t,s){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAMAAAAtr3oOAAAARVBMVEVHcEz///////////////////////////////////////////////////////////////////////////////////////9X1DS3AAAAFnRSTlMAzIELF133JDjlmkqJvqtsBdjutFN6G0dPlQAAAZVJREFUSMeNVVeihCAMFJAiVSxz/6M+eOrqrqDkQyOMCZNG15VkAZauXQhA2tEK0wTVDJ9BKeZWtIToewHZCNfQ+6NFNsPZRRPcwueXh21Bsz0oKTysAR7gNsUhvKPHAWbTDIbxFc4RDzWCN+Sfn38+VEKvTLCeXE6QzkW8DUZdIsqk4VS7KLDLeu6tx5qITlNuJOuOFUxk1itX8kpPKr7qmUwfUMoGIg35x6dcSBNoRM6fRkMAMnGxVRFFSz4CQD+afS+k02b285jAUUNcTmwE/AN+9BDmqzsnuGpsmMP007kyZbDSDn3K9K0RZUQsdmdlo2jkwS0jpXhakAopX0ov3zq3IENptEgMlQhgKi1PKEfMHD39LQ6mCKflyrFHad0G6TnTx/Ey6+c3pkuMywvXk6lyuc+ceuR6MO1Tew0hDIDuH7huTBkVEDblkdmkUFbl+s+UJ6N+pyBT1w+8xjUxVfkKu1T29l3k2kPs1r4qJnsTBa5LHlbrrfjYmsfbUmB6ROLXrUaB6+yqF6lyd66Pt+5n8w8jhBi/H8e3ZQAAAABJRU5ErkJggg=="},d0xp:function(t,s){},e2Pt:function(t,s,e){t.exports=e.p+"static/img/diaBG.5949dd1.png"},qmiW:function(t,s,e){t.exports=e.p+"static/img/map.cc850ff.png"},"xb+1":function(t,s){}});
//# sourceMappingURL=4.9b4273e2373de1994bc8.js.map