1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"4d6f":function(t,e,n){},8069:function(t,e,n){"use strict";n.r(e);var i=n("da67"),a=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},"85c5":function(t,e,n){"use strict";var i,a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.filters.agency,(function(e,n){var i=t.__get_orig(e),a=t.params.agency.includes(e.id+"");return{$orig:i,g0:a}}))),i=t.__map(t.filters.week,(function(e,n){var i=t.__get_orig(e),a=t.params.day.includes(n+"");return{$orig:i,g1:a}}));t.$mp.data=Object.assign({},{$root:{l0:n,l1:i}})},r=[];n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}))},b297:function(t,e,n){"use strict";var i=n("4d6f"),a=n.n(i);a.a},d537:function(t,e,n){"use strict";(function(t){n("6cdc");i(n("66fd"));var e=i(n("f75a"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},da67:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("cabd"),a=n("3847"),r=n("2f62");function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=function(){n.e("pages/index/components/course").then(function(){return resolve(n("d6c3"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("pages/index/components/card").then(function(){return resolve(n("9dd3"))}.bind(null,n)).catch(n.oe)},d={components:{course:u,card:l},data:function(){return{topHeader:this.globalCustomBarHeight,modalName:"",triggered:!1,grade_now:"年级",sortCur:"home",filters:{},sortIcons:{no:"/static/imgs/index/xiaoshou_shaixuan.png",up:"/static/imgs/index/xiaoshou_shaixuan1.png",down:"/static/imgs/index/xiaoshou_shaixuan2.png"},sortItem:{home:0,sales:0,money:0},courses:[{applying:!0,back:"/static/imgs/index/zmk.png",background:"#5FCFE0",ch:"选课",en:"Course",type:0},{applying:!0,back:"/static/imgs/index/hdk.png",background:"#f8be32",ch:"活动",en:"Activity",type:2},{applying:!1,back:"/static/imgs/index/zmk.png",background:"#67d2a9",ch:"报餐",en:"Catering",type:1}],price:[],params:{page_num:1,course_name:"",agency:[],day:[],price:"",sort:"",list_type:0},init:{page_num:1,course_name:"",agency:[],day:[],price:"",sort:"",list_type:0},list:[],noMore:!1,originList:{}}},computed:o({},(0,r.mapGetters)(["kid"])),onShow:function(){if(!this.kid)return this.globalNavigateTo("myStudents");this.params=Object.assign({},this.init),this.get_list(!0)},methods:{goCourse:function(t){this.params.list_type=t,this.search()},loadFilter:function(){var t=this,e={};(0,i._filter)(e).then((function(e){t.filters=e.data,t.courses[1].applying=t.filters.is_activity,t.courses[2].applying=t.filters.is_catering}))},showModal:function(t){this.modalName=t.currentTarget.dataset.target},hideModal:function(t){this.modalName=null},radioChange:function(t){this.params.price===t?this.params.price=null:this.params.price=t},checkboxChange:function(t){var e=t.target.id,n=t.detail.value;switch(e){case"agency":this.params.agency=n;break;case"day":this.params.day=n;break;case"price":break;default:console.log("error")}},search:function(){this.params.page_num=1,this.get_list()},check_course:function(){this.params.page_num=1,this.get_list(),this.hideModal()},onRefresh:function(){var t=this;this.triggered=!0,this.params.page_num=1,this.params.list_type=0,this.get_list(),setTimeout((function(){t.triggered=!1}),1e3)},loadMore:function(){if(this.noMore)return t.showToast({title:"暂无更多课程数据",icon:"none"}),!1;this.params.page_num++,this.get_list()},sort:function(t){var e={home:0,sales:0,money:0};if(t===this.sortCur){var n=this.sortItem[t];e[t]=n>0?0:1}else this.sortCur=t;var i=e[t]>0?"desc":"asc";this.sortItem=e,this.params.sort=t+"_"+i,this.params.page_num=1,this.get_list()},get_list:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Object.assign({},this.params);n=(0,a.filterParams)(n),n.day.length>0&&(n.day=JSON.stringify(n.day)),n.agency.length>0&&(n.agency=JSON.stringify(n.agency)),(0,i._optionCourse)(n).then((function(i){n.page_num>1?(i.data.length<t.page_size&&(t.noMore=!0),t.list=t.list.concat(i.data)):(t.noMore=!1,t.list=i.data,t.list&&t.list.length>0&&(t.grade_now=t.list[0].grade_now)),e&&t.loadFilter()}))},goGift:function(){this.globalNavigateTo("classGift",{package_id:0})}}};e.default=d}).call(this,n("543d")["default"])},f75a:function(t,e,n){"use strict";n.r(e);var i=n("85c5"),a=n("8069");for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("b297");var s,o=n("f0c5"),c=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],s);e["default"]=c.exports}},[["d537","common/runtime","common/vendor"]]]);
|