| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ab51762a"],{"053b":function(t,e,n){var i=n("1e2c"),r=n("d910").f,a=Function.prototype,o=a.toString,s=/^\s*function ([^ (]*)/,c="name";i&&!(c in a)&&r(a,c,{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(t){return""}}})},"1ca1":function(t,e,n){var i=n("a719"),r=n("74e7"),a=n("90fb"),o=a("species");t.exports=function(t,e){var n;return r(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!r(n.prototype)?i(n)&&(n=n[o],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"1ea7":function(t,e,n){var i=n("efe2"),r=n("90fb"),a=n("f594"),o=r("species");t.exports=function(t){return a>=51||!i((function(){var e=[],n=e.constructor={};return n[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"2dc0":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("mu-dialog",{attrs:{title:"通知",width:"360",open:t.openSimple},on:{"update:open":function(e){t.openSimple=e}}},[t._v(" "+t._s(t.text)+" "),n("mu-button",{attrs:{slot:"actions",flat:"",color:"primary"},on:{click:t.closeSimpleDialog},slot:"actions"},[t._v("关闭")])],1)],1)},r=[],a={data:function(){return{openSimple:!1,text:""}},methods:{openSimpleDialog:function(t){this.openSimple=!0,this.text=t},closeSimpleDialog:function(){this.openSimple=!1}}},o=a,s=n("9ca4"),c=Object(s["a"])(o,i,r,!1,null,"41501c8e",null);e["a"]=c.exports},"2eeb":function(t,e,n){"use strict";var i=n("1c8b"),r=n("5dfd").map,a=n("1ea7"),o=n("ff9c"),s=a("map"),c=o("map");i({target:"Array",proto:!0,forced:!s||!c},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},"5dfd":function(t,e,n){var i=n("e349"),r=n("692f"),a=n("3553"),o=n("d88d"),s=n("1ca1"),c=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,l=4==t,d=6==t,f=5==t||d;return function(v,p,h,m){for(var g,b,y=a(v),_=r(y),C=i(p,h,3),x=o(_.length),w=0,k=m||s,S=e?k(v,x):n?k(v,0):void 0;x>w;w++)if((f||w in _)&&(g=_[w],b=C(g,w,y),t))if(e)S[w]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return w;case 2:c.call(S,g)}else if(l)return!1;return d?-1:u||l?l:S}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},6169:function(t,e,n){},6939:function(t,e,n){t.exports=n.p+"img/banner.e70f9803.png"},"74e7":function(t,e,n){var i=n("2118");t.exports=Array.isArray||function(t){return"Array"==i(t)}},"8dfc":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"pages"},[i("div",{staticClass:"as"},[i("img",{attrs:{src:n("6939"),height:"121",width:"414"}}),i("div",{staticClass:"tabs"},t._l(t.weeks,(function(e,n){return i("div",{class:[{tab:!0},{activeTab:n==t.active}],on:{click:function(e){return t.changeActive(n)}}},[t._v(" "+t._s(e.name)+" "),i("br"),t._v(" "),i("em",[t._v(t._s(e.data))])])})),0),i("span",{staticClass:"sum"},[t._v(" "+t._s(t.today)+" 预约名额剩余 "),t.num>0?i("em",{staticClass:"green"},[t._v(t._s(t.num))]):i("em",{staticClass:"red"},[t._v(t._s(t.num))]),t._v(" 人 ")])]),i("div",{staticClass:"context"},[i("ul",{staticClass:"list"},[t._l(t.list,(function(e){return i("li",{directives:[{name:"show",rawName:"v-show",value:1==e.WxVisible,expression:"l.WxVisible == 1"}],class:[{greenLi:e.remain>0},{redLi:1==e.Status},{yellowLi:0==e.remain},{whiteLi:0==e.WxOrder},{whiteLi:0==e.IsAllowSelect}]},[i("div",{staticClass:"dotContainer"},[e.IsAllowSelect>0?i("div",[e.remain>0&&0!=e.WxOrder?i("i",{staticClass:"dot"}):t._e(),1==e.Status?i("i",{staticClass:"cubes"}):t._e(),0==e.remain&&0==e.remain?i("i",{staticClass:"tri"}):t._e(),0==e.WxOrder?i("i",{staticClass:"x"}):t._e()]):i("div",[i("i",{staticClass:"x"})])]),i("div",{staticClass:"title"},[i("h5",[i("span",{staticClass:"lessons",style:{background:e.ClassColor}},[t._v(t._s(e.ClassName))])]),i("span",[t._v(t._s(e.BeginStr)+" - "+t._s(e.EndStr))])]),i("div",{staticClass:"current"},[i("h5",[t._v("剩余 "),e.remain>0?i("em",{staticClass:"green"},[t._v(t._s(e.remain))]):i("em",{staticClass:"red"},[t._v(t._s(e.remain))]),t._v(" 人 ")]),i("span",[t._v("总名额 "+t._s(e.OrderToplimit)+" 人")])]),e.IsAllowSelect>0?i("div",[e.remain>0&&0==e.OrderId&&0!=e.WxOrder?i("mu-button",{staticClass:"appointBtn greenBtn",on:{click:function(n){return t.appointNow(e)}}},[t._v(" 预约 ")]):t._e(),0==e.remain&&0==e.OrderId?i("mu-button",{staticClass:"appointBtn redBtn",on:{click:t.isFulled}},[t._v("已满 ")]):t._e(),0!=e.OrderId?i("mu-button",{staticClass:"appointBtn yellowBtn",on:{click:function(n){return t.isAppointed(e)}}},[t._v("已约")]):t._e(),0==e.WxOrder?i("mu-button",{staticClass:"appointBtn disableBtn",on:{click:t.isDisable}},[t._v("不可约")]):t._e()],1):i("div",[i("mu-button",{staticClass:"appointBtn disableBtn",on:{click:t.isDisable}},[t._v("不可约")])],1)])})),""==t.list?i("div",{staticClass:"tips"},[i("p",{staticStyle:{"text-align":"center"}},[t._v(" 暂无可预约的课程 ")])]):t._e()],2),i("mu-avatar",{attrs:{color:"rgb(231, 82, 150)"},nativeOn:{click:function(e){return t.goPage("lesson")}}},[i("mu-icon",{attrs:{value:"reorder"}})],1)],1),i("bottomTab",{attrs:{curTab:t.thisTab}}),i("div",{staticClass:"doalog"},[i("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}}},[i("p",[t._v(" 是否预约 课程:"+t._s(t.dialog.ClassName)+" ,时间:"+t._s(t.dialog.BeginStr)+" - "+t._s(t.dialog.EndStr)+" "),i("br")]),i("mu-button",{attrs:{slot:"actions",flat:"",color:"primary"},on:{click:t.closeAlertDialog},slot:"actions"},[t._v("取消")]),i("mu-button",{attrs:{slot:"actions",flat:"",color:"primary"},on:{click:t.confirmAppoint},slot:"actions"},[t._v("确定")])],1)],1),i("alert",{ref:"alertPart"})],1)},r=[],a=(n("2eeb"),n("053b"),n("82ae"),n("a8da")),o=n("b8a1"),s=n("2dc0"),c=(n("379d"),n("fed1")),u={data:function(){return{num:0,thisTab:"预约课程",active:0,sum:0,HaveDays:0,openAlert:!1,reFresh:!0,list:[],weeks:[],today:"",dialog:{id:"",name:"",timeLong:""}}},mounted:function(){this.getQueryNextWeek()},watch:{$route:function(t){"appoint"==t.name&&this.getList()},active:function(t){this.getList()}},activated:function(){var t=this;this.active=0,this.reFresh=!1,this.$nextTick((function(){t.reFresh=!0,t.getQueryNextWeek()}))},methods:{changeActive:function(t){this.active=t},getIndex:function(t){console.log(t)},getQueryNextWeek:function(){var t=this,e=this,n={token:localStorage.token,shopId:this.$route.query.shopId},i=c.stringify(n);this.weeks=[],Object(o["k"])(i).then((function(n){var i=n;0==i.Code?(t.HaveDays=i.Rs,t.getFurtherDays(t.HaveDays)):(e.list=[],e.$message.error(i.Memo))}))},alertInfo:function(t){this.$refs.alertPart.openSimpleDialog(t)},goPage:function(t){this.$router.push({path:"/"+t,query:{shopId:this.$route.query.shopId}})},getFurtherDays:function(t){var e=new Date,n=e.getTime(),i=864e5,r="",a=[],o=0,s=0;this.weeks=[];for(var c=0;c<t;c++)r=new Date(n+c*i),o=r.getMonth()+1,s=r.getDate(),o=o<10?"0"+o:o,s=s<10?"0"+s:s,a={name:this.numberToWeek(r.getDay()),data:r.getMonth()+1+"月"+r.getDate()+"日",orderDate:r.getFullYear()+"-"+o+"-"+s},this.weeks.push(a);this.today=this.weeks[0].name,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;t.openAlert=!1;var e={token:localStorage.token,stdId:t.dialog.StdId},n=c.stringify(e);Object(o["f"])(n).then((function(e){var n=e;0==n.Code?(t.alertInfo("已成功预约","success"),t.getList()):t.alertInfo(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(i){var r=i.result;if(r){var a={token:localStorage.token,orderId:t.OrderId},s=c.stringify(a);Object(o["g"])(s).then((function(t){var e=t;0==e.Code?(n.alertInfo("当前课程已取消预约","success"),n.getList()):n.alertInfo(e.Memo+", 错误码:"+e.Code)}))}else e.alertInfo("点击了取消")}))},isDisable:function(t){this.alertInfo("课程不可预约,请选择其他课程或其他时间预约","info")},getList:function(){var t=this;this.today=this.weeks[this.active].name;var e=this.weeks[this.active].orderDate,n={token:localStorage.token,orderDate:e,shopId:this.$route.query.shopId},i=c.stringify(n);t.list=[],t.num=0,Object(o["a"])(i).then((function(e){var n=e;0==n.Code?(t.list=n.Rs,t.list&&(t.num=0,t.list.map((function(e){e.remain=parseInt(e.OrderToplimit)-parseInt(e.OrderCount),t.num=t.num+e.remain,console.log(t.num)})))):t.alertInfo(n.Memo+", 错误码:"+n.Code)}))}},components:{bottomTab:a["a"],alert:s["a"]}},l=u,d=(n("ff39"),n("9ca4")),f=Object(d["a"])(l,i,r,!1,null,"78e5b3b2",null);e["default"]=f.exports},a8da:function(t,e,n){"use strict";var i=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)},r=[],a={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}}},o=a,s=(n("f644"),n("9ca4")),c=Object(s["a"])(o,i,r,!1,null,"0f57b1ae",null);e["a"]=c.exports},b87d:function(t,e,n){},b8a1:function(t,e,n){"use strict";n.d(e,"q",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"j",(function(){return u})),n.d(e,"p",(function(){return l})),n.d(e,"f",(function(){return d})),n.d(e,"g",(function(){return f})),n.d(e,"h",(function(){return v})),n.d(e,"i",(function(){return p})),n.d(e,"a",(function(){return h})),n.d(e,"n",(function(){return m})),n.d(e,"o",(function(){return g})),n.d(e,"l",(function(){return b})),n.d(e,"d",(function(){return y})),n.d(e,"m",(function(){return _})),n.d(e,"k",(function(){return C})),n.d(e,"e",(function(){return x}));var i=n("82ae"),r=n.n(i);n("379d");function a(t,e){return r.a.post(t,e).then((function(t){var e=t.data;return e}),(function(t){console.info(t)}))}function o(t){var e=headapi+"testSelect";return a(e,t)}function s(t){var e=headapi+"v1/Auth/GenVerifyPic";return a(e,t)}function c(t){var e=headapi+"v1/Auth/GetPhoneVFCode";return a(e,t)}function u(t){var e=headapi+"v1/Auth/PhoneSignIn";return a(e,t)}function l(t){var e=headapi+"v1/Auth/WXBind";return a(e,t)}function d(t){var e=headapi+"v1/Weixin/OderAddByVipUser";return a(e,t)}function f(t){var e=headapi+"v1/Weixin/OderCancelByVipUser";return a(e,t)}function v(t){var e=headapi+"v1/Weixin/OrderListQuery";return a(e,t)}function p(t){var e=headapi+"v1/Weixin/OrderShopQuery";return a(e,t)}function h(t){var e=headapi+"v1/Weixin/CanOrderSchoolTimeTableListQuery";return a(e,t)}function m(t){var e=headapi+"v1/Weixin/VipUserConsumeListQuery";return a(e,t)}function g(t){var e=headapi+"v1/Weixin/VipUserSelfQuery";return a(e,t)}function b(t){var e=headapi+"v1/Weixin/SchoolTimeQueryByDate";return a(e,t)}function y(t){var e=headapi+"v1/User/ManagerSelfQuery";return a(e,t)}function _(t){var e=headapi+"v1/Weixin/VipUserCleCkSum";return a(e,t)}function C(t){var e=headapi+"v1/Weixin/QueryNextWeek";return a(e,t)}function x(t){var e=headapi+"v1/Weixin/MyShopQuery";return a(e,t)}},f644:function(t,e,n){"use strict";var i=n("b87d"),r=n.n(i);r.a},ff39:function(t,e,n){"use strict";var i=n("6169"),r=n.n(i);r.a},ff9c:function(t,e,n){var i=n("1e2c"),r=n("efe2"),a=n("faa8"),o=Object.defineProperty,s={},c=function(t){throw t};t.exports=function(t,e){if(a(s,t))return s[t];e||(e={});var n=[][t],u=!!a(e,"ACCESSORS")&&e.ACCESSORS,l=a(e,0)?e[0]:c,d=a(e,1)?e[1]:void 0;return s[t]=!!n&&!r((function(){if(u&&!i)return!0;var t={length:-1};u?o(t,1,{enumerable:!0,get:c}):t[1]=1,n.call(t,l,d)}))}}}]);
- //# sourceMappingURL=chunk-ab51762a.undefined.1613975717848.js.map
|