| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c830ec3a"],{"053b":function(t,e,n){var a=n("1e2c"),i=n("d910").f,s=Function.prototype,r=s.toString,o=/^\s*function ([^ (]*)/,c="name";a&&!(c in s)&&i(s,c,{configurable:!0,get:function(){try{return r.call(this).match(o)[1]}catch(t){return""}}})},"1ca1":function(t,e,n){var a=n("a719"),i=n("74e7"),s=n("90fb"),r=s("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?a(n)&&(n=n[r],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"1ea7":function(t,e,n){var a=n("efe2"),i=n("90fb"),s=n("f594"),r=i("species");t.exports=function(t){return s>=51||!a((function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"2eeb":function(t,e,n){"use strict";var a=n("1c8b"),i=n("5dfd").map,s=n("1ea7"),r=n("ff9c"),o=s("map"),c=r("map");a({target:"Array",proto:!0,forced:!o||!c},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"5dfd":function(t,e,n){var a=n("e349"),i=n("692f"),s=n("3553"),r=n("d88d"),o=n("1ca1"),c=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,l=4==t,f=6==t,d=5==t||f;return function(m,p,v,b){for(var h,g,_=s(m),C=i(_),w=a(p,v,3),y=r(C.length),k=0,T=b||o,A=e?T(m,y):n?T(m,0):void 0;y>k;k++)if((d||k in C)&&(h=C[k],g=w(h,k,_),t))if(e)A[k]=g;else if(g)switch(t){case 3:return!0;case 5:return h;case 6:return k;case 2:c.call(A,h)}else if(l)return!1;return f?-1:u||l?l:A}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},6939:function(t,e,n){t.exports=n.p+"img/banner.e70f9803.png"},"74e7":function(t,e,n){var a=n("2118");t.exports=Array.isArray||function(t){return"Array"==a(t)}},"7ef0":function(t,e,n){"use strict";var a=n("c686"),i=n.n(a);i.a},"8dfc":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pages"},[a("img",{attrs:{src:n("6939"),height:"121",width:"414"}}),a("mu-tabs",{attrs:{value:t.active,color:"#F2F2F2","indicator-color":"#33CAF7"},on:{"update:value":function(e){t.active=e}}},t._l(t.weeks,(function(e,n){return a("mu-tab",[t._v(t._s(e.name)+" "),a("br"),t._v(" "),a("em",[t._v(t._s(e.data))])])})),1),a("div",{staticClass:"context"},[a("span",{staticClass:"sum"},[t._v(" 当日预约名额剩余 "),t.num>0?a("em",{staticClass:"green"},[t._v(t._s(t.num))]):a("em",{staticClass:"red"},[t._v(t._s(t.num))]),t._v(" 人 ")]),a("ul",{staticClass:"list"},[t._l(t.list,(function(e){return a("li",{class:[{greenLi:e.remain>0},{redLi:1==e.Status},{yellowLi:0==e.remain},{whiteLi:0==e.WxOrder}]},[a("div",{staticClass:"dotContainer"},[e.remain>0?a("i",{staticClass:"dot"}):t._e(),1==e.Status?a("i",{staticClass:"cubes"}):t._e(),0==e.remain?a("i",{staticClass:"tri"}):t._e(),0==e.WxOrder?a("i",{staticClass:"x"}):t._e()]),a("div",{staticClass:"title"},[a("h5",[a("span",{staticClass:"lessons",style:{background:e.ClassColor}},[t._v(t._s(e.ClassName))])]),a("span",[t._v(t._s(e.BeginStr)+" - "+t._s(e.EndStr))])]),a("div",{staticClass:"current"},[a("h5",[t._v("剩余 "),e.remain>0?a("em",{staticClass:"green"},[t._v(t._s(e.remain))]):a("em",{staticClass:"red"},[t._v(t._s(e.remain))]),t._v(" 人")]),a("span",[t._v("总名额 "+t._s(e.OrderToplimit)+" 人")])]),e.remain>0&&0==e.OrderId?a("mu-button",{staticClass:"appointBtn greenBtn",on:{click:function(n){return t.appointNow(e)}}},[t._v("预约")]):t._e(),0==e.remain?a("mu-button",{staticClass:"appointBtn redBtn",on:{click:t.isFulled}},[t._v("已满")]):t._e(),0!=e.OrderId?a("mu-button",{staticClass:"appointBtn yellowBtn",on:{click:function(n){return t.isAppointed(e)}}},[t._v("已约")]):t._e(),0==e.WxOrder?a("mu-button",{staticClass:"appointBtn disableBtn",on:{click:t.isDisable}},[t._v("不可约")]):t._e()],1)})),""==t.list?a("div",{staticClass:"tips"},[a("p",{staticStyle:{"text-align":"center"}},[t._v(" 暂无可预约的课程 ")])]):t._e()],2)]),a("bottomTab",{attrs:{curTab:t.thisTab}}),a("div",{staticClass:"doalog"},[a("mu-dialog",{attrs:{title:"预约课程",width:"600","max-width":"80%","esc-press-close":!1,"overlay-close":!1,open:t.openAlert},on:{"update:open":function(e){t.openAlert=e}}},[a("p",[t._v(" 是否预约 课程:"+t._s(t.dialog.ClassName)+" ,时间:"+t._s(t.dialog.BeginStr)+" - "+t._s(t.dialog.EndStr)+" "),a("br")]),a("mu-button",{attrs:{slot:"actions",flat:"",color:"primary"},on:{click:t.closeAlertDialog},slot:"actions"},[t._v("取消")]),a("mu-button",{attrs:{slot:"actions",flat:"",color:"primary"},on:{click:t.confirmAppoint},slot:"actions"},[t._v("确定")])],1)],1)],1)},i=[],s=(n("2eeb"),n("053b"),n("82ae"),n("a8da")),r=n("b8a1"),o=(n("379d"),n("fed1")),c={data:function(){return{num:0,thisTab:"预约课程",active:0,sum:0,openAlert:!1,list:[],weeks:[],dialog:{id:"",name:"",timeLong:""}}},mounted:function(){this.getFurtherDays()},methods:{getFurtherDays:function(){for(var t=new Date,e=t.getTime(),n=864e5,a="",i=[],s=0,r=0,o=0;o<7;o++)a=new Date(e+o*n),s=a.getMonth()+1,r=a.getDate(),s=s<10?"0"+s:s,r=r<10?"0"+r:r,i={name:this.numberToWeek(a.getDay()),data:a.getMonth()+1+"月"+a.getDate()+"日",orderDate:(new Date).getFullYear()+"-"+s+"-"+r},this.weeks.push(i);this.getList()},numberToWeek:function(t){switch(parseInt(t)){case 1:return"星期一";case 2:return"星期二";case 3:return"星期三";case 4:return"星期四";case 5:return"星期五";case 6:return"星期六";case 0:return"星期天"}},confirmAppoint:function(){var t=this,e={token:localStorage.token,stdId:t.dialog.StdId},n=o.stringify(e);Object(r["d"])(n).then((function(e){var n=e;0==n.Code?(t.Toast("已成功预约","success"),t.openAlert=!1,t.getList()):t.Toast(n.Memo+",错误码:"+n.Code)}))},closeAlertDialog:function(){this.openAlert=!1},appointNow:function(t){this.dialog=t,this.openAlert=!0},isFulled:function(){var t=this;t.$alert("当前课程已满,请选择其他课程或其他时间预约","提示",{okLabel:"知道了"}).then((function(){t.getList()}))},isAppointed:function(t){var e=this,n=this;this.$confirm("是否取消前课程预约?","提示",{type:"warning"}).then((function(a){var i=a.result;if(i){var s={token:localStorage.token,orderId:t.OrderId},c=o.stringify(s);Object(r["e"])(c).then((function(t){var e=t;0==e.Code?(n.Toast("当前课程已取消预约","success"),n.getList()):n.Toast(e.Memo+",错误码:"+e.Code)}))}else e.$toast.message("点击了取消")}))},isDisable:function(t){this.Toast("课程不可预约,请选择其他课程或其他时间预约","info")},getList:function(){var t=this,e=this.weeks[this.active].orderDate,n={token:localStorage.token,orderDate:e},a=o.stringify(n);Object(r["i"])(a).then((function(e){var n=e;0==n.Code?(t.list=n.Rs,t.num=0,t.list&&t.list.map((function(e){e.remain=parseInt(e.OrderToplimit)-parseInt(e.OrderCount),t.num=t.num+e.remain})),console.log(t.num)):t.Toast(n.Memo+",错误码:"+n.Code)}))}},beforeRouteEnter:function(t,e,n){n((function(e){"appoint"==t.name&&e.getList()}))},watch:{active:function(){this.getList()}},components:{bottomTab:s["a"]}},u=c,l=(n("7ef0"),n("9ca4")),f=Object(l["a"])(u,a,i,!1,null,"594c22fc",null);e["default"]=f.exports},a8da:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"bottomTab"}},[n("mu-container",{staticStyle:{width:"100%"},attrs:{color:"primary"}},[n("mu-bottom-nav",{attrs:{value:t.nowTab,color:"#E75296"}},t._l(t.tabs,(function(t){return n("mu-bottom-nav-item",{key:t.tabindex,attrs:{title:t.name,icon:t.src,to:t.class,value:t.name}})})),1)],1)],1)},i=[],s={data:function(){return{nowTab:this.curTab,tabs:[{name:"预约课程",class:"/",src:" ",tabindex:1},{name:"预约记录",class:"record",src:" ",tabindex:2},{name:"我的",class:"mine",src:" ",tabindex:3}]}},props:["curTab"],methods:{},watch:{$route:function(t){this.nowTab=t.meta.title}}},r=s,o=(n("f644"),n("9ca4")),c=Object(o["a"])(r,a,i,!1,null,"0f57b1ae",null);e["a"]=c.exports},b87d:function(t,e,n){},c686:function(t,e,n){},f644:function(t,e,n){"use strict";var a=n("b87d"),i=n.n(a);i.a},ff9c:function(t,e,n){var a=n("1e2c"),i=n("efe2"),s=n("faa8"),r=Object.defineProperty,o={},c=function(t){throw t};t.exports=function(t,e){if(s(o,t))return o[t];e||(e={});var n=[][t],u=!!s(e,"ACCESSORS")&&e.ACCESSORS,l=s(e,0)?e[0]:c,f=s(e,1)?e[1]:void 0;return o[t]=!!n&&!i((function(){if(u&&!a)return!0;var t={length:-1};u?r(t,1,{enumerable:!0,get:c}):t[1]=1,n.call(t,l,f)}))}}}]);
- //# sourceMappingURL=chunk-c830ec3a.d6841ecb.js.map
|