<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{434:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var o=r(141);var n=r(194),c=r(113);function y(t){return function(t){if(Array.isArray(t))return Object(o.a)(t)}(t)||Object(n.a)(t)||Object(c.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},443:function(t,e,r){"use strict";var o=r(9),n=r(43).find,c=r(196),y="find",l=!0;y in[]&amp;&amp;Array(1).find((function(){l=!1})),o({target:"Array",proto:!0,forced:l},{find:function(t){return n(this,t,arguments.length&gt;1?arguments[1]:void 0)}}),c(y)},478:function(t,e,r){},479:function(t,e,r){},606:function(t,e,r){"use strict";r(478)},607:function(t,e,r){"use strict";r(479)},756:function(t,e,r){"use strict";r.r(e);var o=r(18),n=r(434),c=r(16),y=(r(59),r(76),r(66),r(443),r(67),r(31),r(61),r(42),r(38),r(37),r(51),r(36),r(52),r(75),r(77)),l=r(435),d=r(580),f=(r(32),r(112),{name:"courseClassify",props:{cache:{type:Object,default:null},timeType:{type:String,default:""},showClassify:{type:Boolean,default:!1},categoryList:{type:Array,default:function(){return[]}}},data:function(){return{courseTypes:[{label:"全部课程",value:"-1,0,1",active:!0},{label:"直播课",value:"-1"},{label:"体验课",value:"1"},{label:"精品课",value:"0"}],type:"",courseType:this.timeType||"-1,0,1",categoryGroupIdList:0,secondCategoryIdList:0}},computed:{curCategory:function(t){var e=t.categoryList,r=t.categoryGroupIdList,o=function(t,e){return t.reduce((function(t,r){return[].concat(Object(n.a)(t),Object(n.a)(e?r[e]:r||[]))}),[])},c=0===r?[]:[e.find((function(t){return t.id===r}))||{}];return[{categoryId:0,categoryName:"全部"}].concat(Object(n.a)(o(c.map((function(t){return o(t.unitList||[],"unitContentList")})))))},courseStr:function(t){var e=t.courseTypes,r=t.courseType;return e.find((function(t){return t.value===r})).label},categoryStr:function(t){var e=t.categoryList,r=t.categoryGroupIdList,o=t.secondCategoryIdList,n=t.curCategory;return 0===r?"全部分类":o?(n.find((function(t){return t.categoryId===o}))||{}).categoryName:(e.find((function(t){return t.id===r}))||{}).name}},watch:{cache:{immediate:!0,deep:!0,handler:function(t){if(t)this.type=t.type,this.categoryGroupIdList=Number(t.categoryGroupIdList||0),this.secondCategoryIdList=Number(t.secondCategoryIdList||0);else{var e=this.$route.query.id;this.categoryGroupIdList=Number(e||0)}}}},methods:{toggleTab:function(t){this.$emit("setClassifyStatus",t!==this.type||!this.showClassify),this.type=t},toggleCourseType:function(option){this.courseType=option.value,this.$emit("setClassifyStatus",!1),this.getCourse()},changeCategory:function(t,e){"categoryGroupIdList"===e?(this.categoryGroupIdList=t.id,this.secondCategoryIdList=0):(this.secondCategoryIdList=t.categoryId,this.$emit("setClassifyStatus",!1),this.getCourse())},getCourse:function(){this.$emit("ok",{courseTypeList:this.courseType,categoryGroupIdList:this.categoryGroupIdList||"",secondCategoryIdList:this.secondCategoryIdList||"",classifyType:this.type})}}}),h=(r(606),r(7)),m=Object(h.a)(f,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"course-classify"},[r("div",{staticClass:"page-tab"},[r("div",{class:["page-tab-item","classify"===t.type&amp;&amp;t.showClassify?"active":""],on:{click:function(e){return e.stopPropagation(),t.toggleTab("classify")}}},[t._v(" "+t._s(t.categoryStr)+" "),r("i",{staticClass:"arrow"})]),t._v(" "),r("div",{class:["page-tab-item","course"===t.type&amp;&amp;t.showClassify?"active":""],on:{click:function(e){return e.stopPropagation(),t.toggleTab("course")}}},[t._v(" "+t._s(t.courseStr)+" "),r("i",{staticClass:"arrow"})])]),t._v(" "),t.showClassify?r("div",{staticClass:"classify-shade",on:{click:function(e){return t.$emit("setClassifyStatus",!1)}}}):t._e(),t._v(" "),r("transition-group",{attrs:{name:"classify-fade"}},["classify"===t.type&amp;&amp;t.showClassify?r("div",{key:t.type,staticClass:"classify category-wrap"},[r("div",{staticClass:"category"},t._l(t.categoryList,(function(e,o){return r("div",{key:o,class:["category-name",t.categoryGroupIdList===e.id?"active":""],on:{click:function(r){return t.changeCategory(e,"categoryGroupIdList")}}},[t._v(" "+t._s(e.name)+" ")])})),0),t._v(" "),r("transition",{attrs:{name:"category-fade"}},[r("div",{key:t.categoryGroupIdList,staticClass:"category-list"},t._l(t.curCategory,(function(e,o){return r("div",{key:o,class:["category-list-item",t.secondCategoryIdList===e.categoryId?"active":""],on:{click:function(r){return t.changeCategory(e,"secondCategoryIdList")}}},[t._v(" "+t._s(e.categoryName)+" ")])})),0)])],1):t._e(),t._v(" "),"course"===t.type&amp;&amp;t.showClassify?r("div",{key:t.type,staticClass:"classify"},t._l(t.courseTypes,(function(e,o){return r("div",{key:o,class:["classify-item",t.courseType===e.value?"active":""],on:{click:function(r){return t.toggleCourseType(e)}}},[t._v(" "+t._s(e.label)+" ")])})),0):t._e()])],1)}),[],!1,null,"4d4cb00e",null).exports;function C(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&amp;&amp;(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function v(t){for(var i=1;i&lt;arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?C(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):C(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var L={name:"course",components:{mescroll:l.default,courseClassify:m,courseCard:d.a},head:function(){return{title:"课程列表",meta:[{hid:"description",name:"description",content:"课程列表"},{hid:"keywords",name:"keywords",content:"课程列表"}]}},asyncData:function(t){return Object(c.a)(regeneratorRuntime.mark((function e(){var r,o,n,c,l,d,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.store,t.params,o=t.error,t.req,n=t.query,c={},l=n.type,d=n.id,!(f=r.state.cacheCoursePage)){e.next=6;break}return e.abrupt("return",f);case 6:return e.prev=6,e.next=9,Object(y.f)({pageNo:1,courseTypeList:l||"-1,0,1",categoryGroupIdList:d||"",orderByList:"-3",pageSize:20});case 9:c=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),o({statusCode:404});case 15:return c.data=c.data||{},e.abrupt("return",{type:l,queryParam:{courseTypeList:"-1,0,1",categoryGroupIdList:d||"",secondCategoryIdList:"",orderByList:"-3",pageNo:1,pageSize:20},totalCount:c.data.count||0,firstCourseData:c.data||null,courseList:c.data.list||[]});case 17:case"end":return e.stop()}}),e,null,[[6,12]])})))()},data:function(){return{showClassify:!1,cacheClassify:null,type:"",classifyType:"",pageStyleObj:{height:"100vh",overflow:"hidden"},totalCount:0,pageScrollY:0,categoryList:[],courseList:[],queryParam:{courseTypeList:"-1,0,1",categoryGroupIdList:"",secondCategoryIdList:"",orderByList:"-3",pageNo:1,pageSize:20},firstPTypeList:{"-1":310,0:308,1:307,default:306}}},mounted:function(){var t=this;this.queryParam.courseTypeList=this.type?this.type:"-1,0,1";var e=this.firstPTypeList[this.type]||this.firstPTypeList.default;this.$storage.getItem("firstPType")||this.$storage.setItem("firstPType",e),this.getCategoryGroups(),this.handleFirstCourse(),this.mescroll=this.$refs.mescroll.mescroll,this.$nextTick((function(){t.mescroll.scrollTo(t.pageScrollY,0),!t.courseList.length&amp;&amp;t.mescroll.showEmpty()})),window.history&amp;&amp;window.history.pushState&amp;&amp;window.addEventListener("popstate",this.setCacheCoursePage,!1)},destroyed:function(){window.removeEventListener("popstate",this.setCacheCoursePage,!1)},methods:{setCacheCoursePage:function(){this.$store.commit("setCacheCoursePage",null)},handleFirstCourse:function(){var t=this;return Object(c.a)(regeneratorRuntime.mark((function e(){var r,o,n,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.firstCourseData){e.next=2;break}return e.abrupt("return");case 2:return r=t.firstCourseData,o=r.list,n=r.goodsGroupIds,c=r.liveIds,e.next=5,t.getCommonCourseByIds(n,o);case 5:return o=e.sent,e.next=8,t.getLiveCourseListByIds(c,o);case 8:o=e.sent,t.courseList=o,t.firstCourseData=null;case 11:case"end":return e.stop()}}),e)})))()},cachePage:function(){this.$store.commit("setCacheCoursePage",{cacheClassify:{type:this.classifyType,categoryGroupIdList:this.queryParam.categoryGroupIdList,secondCategoryIdList:this.queryParam.secondCategoryIdList},type:this.type,categoryList:this.categoryList,queryParam:this.queryParam,totalCount:this.totalCount,courseList:this.courseList,pageScrollY:this.$refs.mescroll.mescroll.preScrollY})},getList:function(t){this.getcourseList(t.num)},courseInit:function(t){var e=t.courseTypeList,r=t.categoryGroupIdList,o=t.secondCategoryIdList,n=t.classifyType;this.courseList=[],this.classifyType=n,this.type=e,this.$set(this.queryParam,"courseTypeList",e),this.$set(this.queryParam,"categoryGroupIdList",r),this.$set(this.queryParam,"secondCategoryIdList",o),this.mescroll.resetUpScroll()},getCategoryGroups:function(){var t=this;return Object(c.a)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.categoryList.length){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Object(y.c)({type:19,sortType:1});case 4:r=e.sent,t.categoryList=[{id:0,name:"全部",unitList:[{id:0,name:"全部"}]}].concat(Object(n.a)(r.data||[]));case 6:case"end":return e.stop()}}),e)})))()},getcourseList:function(){var t=arguments,e=this;return Object(c.a)(regeneratorRuntime.mark((function r(){var o,c,l,d,f,h;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=t.length&gt;0&amp;&amp;void 0!==t[0]?t[0]:1,e.queryParam.pageNo=o,r.next=4,Object(y.f)(e.queryParam);case 4:if(0===(c=r.sent).status.code){r.next=7;break}return r.abrupt("return");case 7:return l=c.data,d=l.goodsGroupIds,f=l.liveIds,h=(h=l.list)||[],r.next=11,e.getCommonCourseByIds(d,h);case 11:return h=r.sent,r.next=14,e.getLiveCourseListByIds(f,h);case 14:h=r.sent,e.totalCount=c.data.count,e.courseList=1===o?h:[].concat(Object(n.a)(e.courseList),Object(n.a)(h)),e.$nextTick((function(){e.mescroll.endBySize(h.length,e.totalCount)}));case 18:case"end":return r.stop()}}),r)})))()},getCommonCourseByIds:function(t,e){return Object(c.a)(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t&amp;&amp;t.length){r.next=2;break}return r.abrupt("return",e);case 2:return r.next=4,Object(y.d)({ids:t.join(",")});case 4:return 0===(o=r.sent).status.code&amp;&amp;(e=e.map((function(t){var option=o.data.find((function(e){return e.id===t.id}))||{};return option.customPic&amp;&amp;(option.customPic=option.customPic&amp;&amp;option.customPic.url),option.teacherList&amp;&amp;(option.teacherName=option.teacherList.slice(0,2).map((function(t){return t.teacherName.replace(/&lt;highlight&gt;/g,"").replace(/&lt;\/highlight&gt;/g,"").slice(0,4)})).join(" | ")),v(v({},t),option)}))),r.abrupt("return",e);case 7:case"end":return r.stop()}}),r)})))()},getLiveCourseListByIds:function(t,e){return Object(c.a)(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t&amp;&amp;t.length){r.next=2;break}return r.abrupt("return",e);case 2:return r.next=4,Object(y.l)({ids:t.join(",")});case 4:return 0===(o=r.sent).status.code&amp;&amp;(e=e.map((function(t){var option=o.data.find((function(e){return e.id===t.id}))||{};return v(v({},t),option)}))),r.abrupt("return",e);case 7:case"end":return r.stop()}}),r)})))()}}},I=L,w=(r(607),Object(h.a)(I,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"page",style:t.showClassify?t.pageStyleObj:""},[r("courseClassify",{attrs:{cache:t.cacheClassify,timeType:t.type,showClassify:t.showClassify,categoryList:t.categoryList},on:{ok:t.courseInit,setClassifyStatus:function(e){return t.showClassify=e}}}),t._v(" "),r("mescroll",{ref:"mescroll",attrs:{warpId:"courseId",autoInit:!1,pageNo:t.queryParam.pageNo,getList:t.getList}},[r("div",{staticClass:"course-list",attrs:{id:"courseId"}},t._l(t.courseList,(function(e,o){return r("courseCard",{key:o,attrs:{course:e},on:{cachePage:t.cachePage}})})),1)])],1)}),[],!1,null,"39f2ff0c",null));e.default=w.exports;installComponents(w,{Mescroll:r(435).default})}}]);</pre></body></html>