yzms/lfyy/assets/js/index.38a42596.js

2 lines
32 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(t){function e(e){for(var i,r,o=e[0],l=e[1],c=e[2],u=0,p=[];u<o.length;u++)r=o[u],Object.prototype.hasOwnProperty.call(s,r)&&s[r]&&p.push(s[r][0]),s[r]=0;for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(t[i]=l[i]);d&&d(e);while(p.length)p.shift()();return n.push.apply(n,c||[]),a()}function a(){for(var t,e=0;e<n.length;e++){for(var a=n[e],i=!0,o=1;o<a.length;o++){var l=a[o];0!==s[l]&&(i=!1)}i&&(n.splice(e--,1),t=r(r.s=a[0]))}return t}var i={},s={index:0},n=[];function r(e){if(i[e])return i[e].exports;var a=i[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=i,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(a,i,function(e){return t[e]}.bind(null,i));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],l=o.push.bind(o);o.push=e,o=o.slice();for(var c=0;c<o.length;c++)e(o[c]);var d=l;n.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("56d7")},1:function(t,e){},2968:function(t,e,a){},"314a":function(t,e,a){"use strict";a("aa96")},"3f39":function(t,e,a){},"56d7":function(t,e,a){"use strict";a.r(e);a("e260"),a("e6cf"),a("cca6"),a("a79d");var i=a("2b0e"),s=a("2f62"),n={},r=n,o=a("53ca"),l=(a("c975"),a("ac1f"),a("acd8"),a("5319"),a("4d63"),a("25f0"),a("99af"),a("dca8"),a("d3b7"),a("159b"),a("7039"),a("e21d"),navigator.userAgent.toLowerCase()),c=l&&l.indexOf("android")>0?"android":l&&/iphone|ipad|ipod|ios/.test(l)?"ios":"brower";var d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm:ss";if("object"!==Object(o["a"])(t))return"选择日期";var a={"M+":t.getMonth()+1,"D+":t.getDate(),"h+":t.getHours()%12===0?12:t.getHours()%12,"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()},i={0:"日",1:"一",2:"二",3:"三",4:"四",5:"五",6:"六"};for(var s in/(Y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))),/(E+)/.test(e)&&(e=e.replace(RegExp.$1,(RegExp.$1.length>1?RegExp.$1.length>2?"星期":"周":"")+i[t.getDay()+""])),a)new RegExp("("+s+")").test(e)&&(e=e.replace(RegExp.$1,1===RegExp.$1.length?a[s]:("00"+a[s]).substr((""+a[s]).length)));return e},u=function t(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(a){!e.hasOwnProperty(a)||null===e[a]||"object"!==Object(o["a"])(e[a])&&"function"!==typeof e[a]||Object.isFrozen(e[a])||t(e[a])})),e},p={namespaced:!0,state:{title:"",msg:"",dialog:"",loading:!1,platform:c},getters:{title:function(t,e,a){return t.title},msg:function(t,e,a){return t.msg},dialog:function(t,e,a){return t.dialog},loading:function(t,e,a){return t.loading},platform:function(t,e,a){return t.platform}},mutations:{loading:function(t,e){t.loading=e},msg:function(t,e){t.msg=e},setTitle:function(t,e){document.title=e,t.title=e},setMsg:function(t,e){t.msg=e},dialog:function(t,e){t.dialog=e},setDialog:function(t,e){t.dialog=e}},actions:{setMsg:function(t,e){var a=t.commit;t.state;a("setMsg",e)},setDialog:function(t,e){var a=t.commit;t.state;a("setDialog",e)},setTitle:function(t,e){var a=t.commit;t.state;a("setTitle",e)}}},_=p,h=(a("841c"),a("1276"),a("fb6a"),a("466d"),a("498a"),function(t){return decodeURIComponent(t.replace(/\+/g," "))}),f=function(t,e,a){"undefined"===typeof t&&"undefined"!==typeof document&&(t=document.location.search);var i={};if("string"!==typeof t||0===m(t).length)return i;t=t.replace(/^\?/,"");var s=t.split(e||"&");a=a||"=";for(var n=0;n<s.length;n++){var r=s[n].split(a),o=h(m(r[0])),l=h(m(r.slice(1).join(a))),c=o.match(/^(\w+)\[\]$/);c&&c[1]&&(o=c[1]),hasOwnProperty.call(i,o)?(isArray(i[o])||(i[o]=[i[o]]),i[o].push(l)):i[o]=c?[l]:l}return i},m=String.prototype.trim?function(t){return null==t?"":String.prototype.trim.call(t)}:function(t){return null==t?"":t.toString().replace(/^\s+/,"").replace(/\s+$/,"")},g=f(),b={namespaced:!0,state:{user:void 0,token:g.token},getters:{user:function(t,e,a){return t.user},token:function(t,e,a){return t.token}},mutations:{setUser:function(t,e){t.user=e},setToken:function(t,e){t.token=e}},actions:{setUser:function(t,e){var a=t.commit;t.state;a("setUser",e)},setToken:function(t,e){var a=t.commit;t.state;a("setToken",e)}}},v=b;i["a"].use(s["a"]);var x=new s["a"].Store({strict:!1,modules:{base:_,user:v},getters:r}),y=a("8c4f"),k=a("8336"),w=a("a523"),C=a("0e8f"),j=a("132d"),O=a("a722"),D=a("67b6"),P=a("43a6"),M=function(){var t=this,e=t._self._c;return e(O["a"],{staticClass:"grey lighten-4",attrs:{column:"","fill-height":""}},[t.self_loading?e("loading-space",{attrs:{wrap:!0}}):t.data.length?[e(C["a"],{staticClass:"white",attrs:{shrink:""}},[e("h3",{staticClass:"home-title"},[t._v("小岛理发预约")]),e("p",{staticClass:"home-account"},[t._v("美发币: "),e("b",[t._v(t._s(t.account))])]),e("div",{staticClass:"scroll-x nowrap subtitle py-2 border-bottom-1px text-xs-center pr-2"},t._l(t.data,(function(a,i){return e("div",{key:i,staticClass:"place-item grey lighten-4 d-inline-block border-radius ml-2 px-2 py-1 text-xs-center font-weight-bold",class:{active:i===t.place_idx},on:{click:function(){t.place_idx=i,t.day_idx=0,t.time_idx=0}}},[t._v(" "+t._s(a.place)+" ")])})),0),e("div",{staticClass:"scroll-x nowrap subheading py-2 pr-2"},t._l(t.data[t.place_idx].days,(function(a,i){return e("div",{key:i,staticClass:"d-inline-block text-xs-center ml-2 pa-2 grey lighten-4 border-radius day-item",class:{active:i===t.day_idx},on:{click:function(){t.day_idx=i,t.time_idx=0}}},[e("div",{staticClass:"font-weight-bold"},[t._v(t._s(a.xq))]),e("div",[t._v(" "+t._s(t.dateFormat(new Date(a.date.replace(/\//g,"-")),"MM-DD"))+" ")])])})),0)]),e(C["a"],{staticClass:"relative",attrs:{grow:""}},[e("div",{staticClass:"inset-0 border-top-radius grey lighten-5"},[e(O["a"],{attrs:{row:"","fill-height":""}},[e(C["a"],{attrs:{xs4:"","fill-height":""}},[e("div",{staticClass:"fill-height scroll-y border-right-1px border-top-1px white py-2"},[e(O["a"],{attrs:{column:"","align-center":""}},t._l(t.data[t.place_idx].days[t.day_idx].times,(function(a,i){return e("div",{key:i,staticClass:"letter-wrap py-2 subtitle border-bottom-1px border-radius px-2 my-2 time-item",class:{active:i===t.time_idx},staticStyle:{width:"90%","text-align":"center"},on:{click:function(e){t.time_idx=i}}},[e("div",{staticClass:"font-weight-bold"},[t._v(" "+t._s(a.start_time)+" ")])])})),0)],1)]),e(C["a"],{attrs:{xs8:""}},[e("div",{staticClass:"pa-2 fill-height scroll-y"},t._l(t.data[t.place_idx].days[t.day_idx].times[t.time_idx].parts,(function(a,i){return e("div",{key:i,staticClass:"letter-wrap subtitle border-bottom-1px white mb-2 border-radius"},[e(w["a"],{attrs:{"grid-list-md":""}},[e(O["a"],{attrs:{"align-center":"","justify-space-between":""}},[e(C["a"],{attrs:{shrink:""}},[e(j["a"],{staticClass:"park pa-1",attrs:{color:"white",size:"6vw"}},[t._v("mdi-chair-rolling")])],1),e(C["a"],{staticClass:"subtitle grey--text text--darken-4"},[t._v(t._s(a.park_name))])],1),e(O["a"],{attrs:{row:"","justify-space-between":"","align-center":""}},[e(C["a"],{staticClass:"text-xs-right"},[1==a.status?e("span",{staticClass:"book-btn py-2 px-3 border-radius subtitle active",on:{click:function(){t.park_idx=i,t.showPopup=!0}}},[t._v(" 预约 ")]):e("span",{staticClass:"subtitle grey--text pr-2",style:{color:5===a.status?"red!important":"#9e9e9e"}},[t._v(t._s(a.status_name))])])],1)],1)],1)})),0)])],1)],1)]),e("cube-popup",{ref:"book-popup",attrs:{type:"popup",position:"top"}},[e("div",{staticClass:"cube-extend-popup-content"},[t._t("default",(function(){return[t.showPopup?e(w["a"],{staticClass:"white border-bottom-radius",attrs:{"grid-list-lg":""}},[e(O["a"],{attrs:{column:"",ass:"book-content subheading"}},[e(C["a"],{staticClass:"subtitle py-3 text-xs-center font-weight-bold"},[t._v("请确认预约用户信息")]),e(C["a"],[t._v(" 预约地点: "),e("strong",{staticClass:"red--text"},[t._v(t._s(t.data[t.place_idx].place))])]),e(C["a"],[t._v(" 预约时段: "),e("strong",{staticClass:"red--text"},[t._v(t._s(t.data[t.place_idx].days[t.day_idx].date)+""+t._s(t.data[t.place_idx].days[t.day_idx].xq)+""+t._s(t.data[t.place_idx].days[t.day_idx].times[t.time_idx].start_time)+"~"+t._s(t.data[t.place_idx].days[t.day_idx].times[t.time_idx].end_time))])]),e(C["a"],[t._v(" 预约理发师: "),e("strong",{staticClass:"red--text"},[t._v(t._s(t.data[t.place_idx].days[t.day_idx].times[t.time_idx].parts[t.park_idx].park_name))])]),t.data[t.place_idx].days[t.day_idx].times[t.time_idx].parts[t.park_idx].lf_phone?e(C["a"],[t._v(" 预约电话: "),e("strong",{staticClass:"red--text"},[e("a",{staticClass:"red--text",staticStyle:{"text-decoration":"underline","font-weight":"bolder"},attrs:{href:"tel:"+t.data[t.place_idx].days[t.day_idx].times[t.time_idx].parts[t.park_idx].lf_phone}},[t._v(" "+t._s(t.data[t.place_idx].days[t.day_idx].times[t.time_idx].parts[t.park_idx].lf_phone)+" ")])])]):t._e(),e("hr",{staticStyle:{margin:"1rem",color:"grey",opacity:"0.3"}}),e(C["a"],[e(O["a"],{attrs:{row:"",wrap:""}},[e(C["a"],{attrs:{shrink:""}},[t._v("用户姓名:")]),e("cube-input",{attrs:{placeholder:"请输入预约用户姓名"},model:{value:t.username,callback:function(e){t.username=e},expression:"username"}})],1)],1),e(C["a"],[e(O["a"],{attrs:{row:"",wrap:""}},[e(C["a"],{attrs:{shrink:""}},[t._v("手机号码:")]),e("cube-input",{attrs:{placeholder:"请输入预约用户手机号"},model:{value:t.cellphone,callback:function(e){t.cellphone=e},expression:"cellphone"}})],1)],1),e(C["a"],[e(O["a"],{attrs:{row:"",wrap:""}},[e(C["a"],{attrs:{shrink:""}},[t._v("预约项目:")]),e(P["a"],{model:{value:t.yy_type,callback:function(e){t.yy_type=e},expression:"yy_type"}},t._l(t.bookList,(function(t){return e(D["a"],{attrs:{label:t.name,value:t.id}})})),1)],1)],1)],1),e(O["a"],{staticClass:"px-4 pt-2",attrs:{row:"","justify-space-between":"","align-center":""}},[e(C["a"],{staticClass:"subheading grey--text text--darken-2",attrs:{xs5:""},on:{click:function(e){t.showPopup=!1}}},[t._v("取消")]),e(C["a"],{staticClass:"title",attrs:{xs5:""}},[e(k["a"],{attrs:{color:"green lighten-1",dark:"",depressed:"",loading:t.loading,disabled:t.loading},on:{click:t.confirmBook}},[t._v("确认预约")])],1)],1)],1):t._e()]}))],2)])]:e("div",{staticClass:"fill-height"},[e(O["a"],{attrs:{column:"","align-center":"","justify-center":"","fill-height":""}},[e("span",{staticClass:"grey--text subheading"},[t._v("暂无数据")]),e(k["a"],{staticClass:"letter-spacing",attrs:{depressed:"",round:"",outline:"",large:"",color:"grey",ripple:!1},on:{click:t.fetchData}},[t._v("刷新")])],1)],1)],2)},S=[],$=a("5530"),T={name:"Home",data:function(){return{self_loading:!0,data:[],place_idx:0,day_idx:0,time_idx:0,park_idx:0,showPopup:!1,username:"",cellphone:"",yy_type:"",account:"获取中",bookList:[]}},computed:Object($["a"])(Object($["a"])({},Object(s["c"])("user",["token"])),Object(s["c"])("base",["loading"])),watch:{token:function(t,e){this.resetData()},showPopup:function(t){t?this.$refs["book-popup"]&&this.$refs["book-popup"].show():this.$refs["book-popup"]&&this.$refs["book-popup"].hide()},"list.current_idx":function(t,e){null===t||this.list.data[t].ready||this.$set(this.list.data[t],"ready",!0)}},activated:function(){this.fetchData()},methods:Object($["a"])(Object($["a"])({resetData:function(){this.data=[],this.place_idx=0,this.day_idx=0,this.time_idx=0,this.park_idx=0},changeIdx:function(t){t!=this.$refs.listNav.slide.getCurrentPage().pageX&&this.$set(this.list,"current_idx",t)},dateFormat:function(t,e){return d(t,e)},fetchData:function(){var t=this;this.self_loading=!0,this.$axios.get("/mall.php",{params:{act:"lfyy_get_parks"}}).then((function(e){t.showPopup=!1,1==e.status?(e.data.user&&(t.username=e.data.user.username,t.cellphone=e.data.user.cellphone,t.account=e.data.user.account,t.bookList=e.data.bookList),e.data.list.length?(t.data.length||(t.place_idx=0,t.day_idx=0,t.time_idx=0,t.park_idx=0),t.data=e.data.list):t.resetData()):t.setMsg(e.message)})).catch((function(e){t.showPopup=!1,t.place_idx=0,t.day_idx=0,t.time_idx=0,t.park_idx=0,t.setMsg(e)})).then((function(){t.showPopup=!1,t.self_loading=!1}))},handinData:function(){var t=this;this.self_loading=!0,this.$axios.post("/mall.php?act=lfyy_add_order&token="+x.state.user.token,{date:this.data[this.place_idx].days[this.day_idx].date,time_id:this.data[this.place_idx].days[this.day_idx].times[this.time_idx].time_id,park_id:this.data[this.place_idx].days[this.day_idx].times[this.time_idx].parts[this.park_idx].park_id,username:this.username,cellphone:this.cellphone,yy_type:this.yy_type}).then((function(e){t.self_loading=!1,1==e.status?(t.setDialog(e.message),t.fetchData()):(t.showPopup=!1,t.setMsg(e.message))})).catch((function(e){t.showPopup=!1,t.self_loading=!1,t.setMsg(e)}))},confirmBook:function(){this.data.length&&null!==this.place_idx&&null!==this.day_idx&&null!==this.time_idx&&null!==this.park_idx&&""!=this.username&&""!=this.cellphone&&""!=this.yy_type?this.handinData():this.setDialog("数据异常")}},Object(s["b"])("user",["setUser"])),Object(s["b"])("base",["setDialog","setMsg"]))},q=T,E=(a("e5d5"),a("2877")),I=Object(E["a"])(q,M,S,!1,null,"7194798a",null),A=I.exports,B=function(){var t=this,e=t._self._c;return e(O["a"],{staticClass:"my-bg",attrs:{column:"","fill-height":""}},[e("div",{staticClass:"scroll-y grey lighten-4 pt-3 px-3"},[t.self_loading?[e("loading-space")]:t.data.length?[t._l(t.data,(function(a,i){return e("div",{key:i,staticClass:"white border-radius mb-3"},[e(w["a"],{attrs:{"grid-list-md":""}},[e(O["a"],{attrs:{row:"",wrap:""}},[e(C["a"],{attrs:{grow:""}},[e(O["a"],{staticClass:"grey--text text--darken-2 subheading",attrs:{column:""}},[e(C["a"],{staticClass:"pb-2 subtitle"},[e("strong",[t._v(t._s(t.dateFormat(new Date(a.date.replace(/\//g,"-")),"MM月DD日"))+""+t._s(a.xq)+"")]),a.can_cancel?e("span",{staticClass:"cancel caption underline blue--text text--lighten-1",on:{click:function(e){return t.cancelConfirm(i)}}},[t._v("取消预定")]):t._e()]),e(C["a"],[t._v(" 时段: "),e("strong",[t._v(t._s(a.start_time))])]),e(C["a"],[t._v(" 地点: "),e("strong",[t._v(t._s(a.place)+"-"+t._s(a.name))])]),e(C["a"],[t._v("姓名: "+t._s(a.username))]),e(C["a"],[t._v("手机: "+t._s(a.cellphone))])],1)],1),e(C["a"],{staticClass:"marker",attrs:{shrink:""}},[e(O["a"],{attrs:{row:"","align-center":"","justify-center":"","fill-height":""}},[e("div",{staticClass:"item"},[t._v(t._s(a.status_name))])])],1)],1)],1)],1)})),100==t.data.length?e("div",{staticClass:"text-xs-center grey--text mb-3"},[t._v(" 暂支持显示最近100条 ")]):t._e()]:[e("empty-space")]],2)])},L=[],R={data:function(){return{self_loading:!1,data:[],page:1,dialog:null}},computed:{},activated:function(){this.fetchData()},methods:Object($["a"])({dateFormat:function(t,e){return d(t,e)},cancelConfirm:function(t){var e=this;this.$createDialog({type:"confirm",icon:"cubeic-alert",title:"是否确定取消预约服务",content:"".concat(this.data[t].date,"").concat(this.data[t].xq,"").concat(this.data[t].place,"-").concat(this.data[t].name),confirmBtn:{text:"确定",active:!1,disabled:!1,href:"javascript:;"},cancelBtn:{text:"保留预约",active:!0,disabled:!1,href:"javascript:;"},onConfirm:function(){e.handinData(t)},onCancel:function(){}}).show()},handinData:function(t){var e=this;this.self_loading=!0,this.$axios.post("/mall.php?act=lfyy_cancel_order&token="+x.state.user.token,{order_id:this.data[t].id}).then((function(a){1==a.status&&(e.data[t].status_name="已取消",e.data[t].can_cancel=0),e.setDialog(a.message)})).catch((function(t){e.setDialog(t.message)})).then((function(){e.self_loading=!1}))},fetchData:function(){var t=this;this.self_loading=!0,this.$axios.get("/mall.php",{params:{act:"lfyy_order_list",page:this.page,pagesize:100}}).then((function(e){1==e.status?e.data.list.length&&(t.data=e.data.list):t.setMsg(e.message)})).catch((function(e){t.setMsg(e.message)})).then((function(){t.self_loading=!1,t.showPopup=!1}))}},Object(s["b"])("base",["setMsg","setDialog"]))},H=R,N=(a("8685"),Object(E["a"])(H,B,L,!1,null,"5ba2581b",null)),U=N.exports,F=function(){var t=this,e=t._self._c;return e(w["a"],{staticClass:"transparent"},[e(O["a"],{attrs:{column:"","fill-height":""}},[e(C["a"],{staticClass:"relative"},[e("div",{staticClass:"inset-0"},[e("keep-alive",[e("router-view")],1)],1)]),e("TabBar",{attrs:{list:t.list}})],1)],1)},Y=[],z=a("afd9"),X=function(){var t=this,e=t._self._c;return e("div",{staticClass:"border-top-1px"},[e(O["a"],{staticClass:"py-1"},t._l(t.list,(function(a,i){return e("router-link",{key:i,attrs:{to:a.path,replace:""},scopedSlots:t._u([{key:"default",fn:function(i){i.href;var s=i.route,n=i.navigate,r=i.isActive;return[e(C["a"],{attrs:{tag:"a"},on:{click:n}},[e(O["a"],{attrs:{column:"","align-content-center":"","justify-center":"","fill-height":""}},[e(j["a"],{attrs:{color:r?"primary":"primary lighten-2"}},[t._v(t._s(r?a.inline_icon:a.outline_icon))]),e("div",{staticClass:"text-xs-center overline primary--text",class:{"text--lighten-2":!r}},[t._v(t._s(s.meta.title))])],1)],1)]}}],null,!0)})})),1),e(z["a"],{staticClass:"safe-area-inset-bottom",attrs:{color:"transparent"}})],1)},J=[],W={name:"TabBar",props:{list:{type:Array,required:!0}}},G=W,K=Object(E["a"])(G,X,J,!1,null,null,null),Q=K.exports,V={components:{TabBar:Q},data:function(){var t=u([{path:"/Home",outline_icon:"mdi-hair-dryer-outline",inline_icon:"mdi-hair-dryer"},{path:"/My",outline_icon:"mdi-clipboard-list-outline",inline_icon:"mdi-clipboard-list"}]);return{list:t}}},Z=V,tt=Object(E["a"])(Z,F,Y,!1,null,null,null),et=tt.exports,at=function(){var t=this,e=t._self._c;return e(w["a"],{staticClass:"grey lighten-4 overflow-hidden",attrs:{fluid:""}},[null===t.place_idx?[e("div",{staticClass:"scroll-y"},[e("div",{staticClass:"border-bottom-1px py-1 font-weight-bold pl-4"},[t._v("选择地点")]),e(O["a"],{attrs:{column:"","justify-start":""}},t._l(t.place_list,(function(a,i){return e(C["a"],{key:i,staticClass:"py-1 border-bottom-1px grey--text text--darken-3 pl-4",attrs:{shrink:""}},[e(O["a"],{attrs:{row:"","align-center":""},on:{click:function(e){t.place_idx=i}}},[e(j["a"],{attrs:{color:"grey lighten-1"}},[t._v("mdi-arrow-right-circle-outline")]),t._v(" "+t._s(a.place)+" ")],1)],1)})),1)],1)]:null===t.park_idx?[e("div",{staticClass:"scroll-y"},[e("div",{staticClass:"border-bottom-1px py-1 pl-4"},[e(O["a"],{staticClass:"font-weight-bold",attrs:{row:"","align-center":""},on:{click:function(e){t.place_idx=null}}},[e(j["a"],[t._v("mdi-chevron-left")]),t._v("返回 ")],1)],1),e(O["a"],{attrs:{"justify-start":"",wrap:""}},t._l(t.place_list[t.place_idx].parts,(function(a,i){return e(C["a"],{key:i,staticClass:"py-1 border-bottom-1px grey--text text--darken-3 pl-4",attrs:{xs6:"",shrink:""}},[e(O["a"],{attrs:{row:"","align-center":""},on:{click:function(e){return t.choosePark(i)}}},[e(j["a"],{attrs:{color:"grey lighten-1"}},[t._v("mdi-arrow-right-circle-outline")]),t._v(" "+t._s(a.name)+" ")],1)],1)})),1)],1)]:[e(O["a"],{staticClass:"black fill-height px-2",attrs:{column:""}},[e(C["a"],{attrs:{shrink:""}},[e(O["a"],{staticClass:"py-1",attrs:{"justify-space-between":"","align-center":""}},[e(C["a"],{staticClass:"font-weight-bold place-name title"},[t._v(" "+t._s(t.place_list[t.place_idx].place)+"-"+t._s(t.place_list[t.place_idx].parts[t.park_idx].name)+"(理发师) ")]),e(j["a"],{attrs:{color:"grey darken-3"},on:{click:t.reset}},[t._v("mdi-close")])],1)],1),e(C["a"],{attrs:{grow:""}},[t.now_car_plate?[e("div",{staticClass:"car-bg"},[e(O["a"],{attrs:{row:"","align-end":"","fill-height":"","justify-center":""}},[e("div",{staticClass:"car-plate px-2 font-weight-bold"},[t._v(" "+t._s(t.now_car_plate)+" ")])])],1)]:[e(O["a"],{staticClass:"green--text text--lighten-1 forrent-text font-weight-bold text-xs-center",attrs:{row:"","align-center":"","justify-center":""}},[t._v(" 空闲 ")])],t.order_list.length?[e(w["a"],{staticClass:"pa-0 pt-1",attrs:{fluid:""}},[e(O["a"],{attrs:{column:""}},t._l(t.order_list,(function(a,i){return e(C["a"],{attrs:{shrink:""}},[e("div",{staticClass:"grey--text text--lighten-3 subtitle border-bottom-1px"},[e("span",[t._v(t._s(a.start_time)+"~"+t._s(a.end_time))]),e("strong",[t._v(t._s("-"+a.cph))]),e("strong",{staticClass:"red--text"},[t._v(t._s(0==i&&t.now_car_plate?" "+t.leave_time_txt:""))])])])})),1)],1)]:t._e()],2)],1)]],2)},it=[],st=(a("e25e"),{name:"Park",data:function(){return{self_loading:!1,place_idx:null,park_idx:null,place_list:[],order_list:[],timer:null,countdown_timer:null,now_car_plate:"",end_time:"",leave_time_txt:""}},watch:{park_idx:{handler:function(t,e){var a=this;console.log("222"),null!==t?this.timer||(this.timer=setInterval((function(){a.fetchParkDetail()}),4e3),this.fetchParkDetail()):this.timer&&(clearInterval(this.timer),this.timer=null)}},end_time:function(t,e){var a=this;t?(this.countdown_timer&&clearInterval(this.countdown_timer),this.countdown_timer=setInterval((function(){a.leaveTimeCountDown()}),1e3),this.leaveTimeCountDown()):this.countdown_timer&&clearInterval(this.countdown_timer)}},mounted:function(){this.fetchData()},methods:Object($["a"])({leaveTimeCountDown:function(){var t=(new Date).valueOf(),e=this.end_time-t;e>0?this.leave_time_txt=this.formatConutDown(e):(clearInterval(this.countdown_timer),this.countdown_timer=null)},formatConutDown:function(t){var e=parseInt(t%864e5/36e5);e=e<10?"0"+e:e;var a=parseInt(t%36e5/6e4);a=a<10?"0"+a:a;var i=parseInt(t%6e4/1e3);return i=i<10?"0"+i:i,e+":"+a+":"+i},reset:function(){this.place_idx=null,this.park_idx=null,this.end_time=null,this.leave_time_txt="",this.order_list=[],localStorage.removeItem("place_idx"),localStorage.removeItem("park_idx")},choosePark:function(t){this.park_idx=t,localStorage.setItem("place_idx",this.place_idx),localStorage.setItem("park_idx",t)},fetchParkDetail:function(){var t=this;this.self_loading=!0,this.$axios.get("/mall.php",{params:{act:"lfyy_get_parks_order_screen",park_id:this.place_list[this.place_idx].parts[this.park_idx].id,token:x.state.user.token}}).then((function(e){if(1==e.status){if(t.order_list=e.data.order_list,e.data.order_list.length){var a=e.data.order_list[0],i=new Date("".concat(a.date," ").concat(a.start_time)).valueOf(),s=new Date("".concat(a.date," ").concat(a.end_time)).valueOf(),n=(new Date).valueOf();if(n<s||n>i)return t.now_car_plate=e.data.order_list[0].cph,t.time_range="".concat(e.data.order_list[0].start_time,"~").concat(e.data.order_list[0].end_time),void(t.end_time=s)}}else t.order_list=[],t.setMsg(e.message);t.now_car_plate=""})).catch((function(e){t.setMsg(e)})).then((function(){t.self_loading=!1}))},fetchData:function(){var t=this;this.self_loading=!0,this.$axios.get("mall.php",{params:{act:"lfyy_get_parks_screen",token:x.state.user.token}}).then((function(e){1==e.status?(localStorage.getItem("place_idx")&&localStorage.getItem("park_idx")&&(t.place_idx=localStorage.getItem("place_idx"),t.park_idx=localStorage.getItem("park_idx")),t.place_list=e.data.part_list):t.setMsg(e.message)})).catch((function(e){t.setMsg(e)})).then((function(){t.self_loading=!1}))}},Object(s["b"])("base",["setDialog","setMsg"]))}),nt=st,rt=(a("bbaa"),Object(E["a"])(nt,at,it,!1,null,"7f1f74d1",null)),ot=rt.exports;i["a"].use(y["a"]);var lt=new y["a"]({routes:[{path:"/",component:et,name:"/Index",redirect:"/Home",meta:{requireAuth:!0,keepAlive:!0,title:"理发预约"},children:[{path:"/Home",name:"/Home",component:A,meta:{title:"预约",requireAuth:!0,keepAlive:!0}},{path:"/My",name:"/My",component:U,meta:{title:"订单",requireAuth:!0,keepAlive:!0}}]},{path:"/Park",component:ot,name:"/Park",meta:{requireAuth:!0,keepAlive:!0,title:"充电桩显示器"}}]});lt.beforeEach((function(t,e,a){t.matched.some((function(t){return t.meta.requireAuth}))&&x.state.user.token,a(),t.meta.title&&x.dispatch("base/setTitle",t.meta.title)}));var ct=lt,dt=(a("1d1c"),{click:!1,directionLockThreshold:0,bindToWrapper:!0,pullDownRefresh:!1,pullUpLoad:!1,probeType:3,observeDOM:!1,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/,className:/(^|\s)can-select(\s|$)/}}),ut=Object($["a"])(Object($["a"])({},dt),{},{click:!0}),pt=Object($["a"])(Object($["a"])({},dt),{},{pullDownRefresh:!0,click:!0}),_t=Object($["a"])(Object($["a"])({},dt),{},{listenScroll:!1,eventPassthrough:"vertical"}),ht=Object($["a"])(Object($["a"])({},dt),{},{listenScroll:!0,eventPassthrough:"vertical"}),ft=Object($["a"])(Object($["a"])({},dt),{},{probeType:3,click:!0,scrollX:!0,eventPassthrough:"vertical"}),mt={install:function(t,e){Object.defineProperties(t.prototype,{$Base_Options:{value:dt},$Manual_Slide_Options:{value:_t},$Touch_Slide_Options:{value:ht},$Pull_Scroll_Options:{value:pt},$Scroll_Options:{value:ut},$Free_Scroll_Component_Options:{value:ft}})}};i["a"].use(mt);var gt=a("4328"),bt=a.n(gt),vt=a("bc3a"),xt=a.n(vt),yt={baseURL:"../show/",timeout:2e4,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},transformRequest:function(t){return bt.a.stringify(t)}},kt=xt.a.create(yt);kt.interceptors.request.use((function(t){var e={token:x.state.user.token},a="post"==t.method?"data":"params";return t[a]=Object.assign(t[a]?t[a]:{},e),1!=t[a].hide_loading&&x.commit("base/loading",!0),x.commit("base/setMsg",""),t}),(function(t){return x.commit("base/loading",!1),x.commit("base/setMsg",""),Promise.reject(t)})),kt.interceptors.response.use((function(t){x.commit("base/loading",!1),x.commit("base/setMsg","");var e=t.data;return"undefined"===typeof e.status?Promise.reject("系统繁忙"):-1===e.status?Promise.reject("页面已过期,请重新登陆"):e}),(function(t){return x.commit("base/loading",!1),x.commit("base/setMsg",""),t.response?Promise.reject("接口返回异常信息"):t.request?Promise.reject("接口返回超时"):Promise.reject("program error:"+t)})),Plugin.install=function(t,e){Object.defineProperties(t.prototype,{axios:{get:function(){return kt}},$axios:{get:function(){return kt}}})},i["a"].use(Plugin);var wt=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:t._f("transition_name")(t.position)},on:{"after-leave":t.handleLeave}},[t.visible?e("cube-popup",{ref:"popup",attrs:{type:"extend-popup",visible:t.visible,position:t.position,mask:!1}},[e("div",{staticClass:"cube-extend-popup-content",class:t._f("border_style")(t.position)},["top"==t.position?e(z["a"],{staticClass:"safe-area-inset-top",attrs:{color:"transparent"}}):t._e(),e(w["a"],{staticClass:"grey lighten-5 border-radius",attrs:{"grid-list-md":""}},[e(O["a"],{attrs:{column:"","justify-center":"","align-center":""}},[e(C["a"],{staticClass:"headline grey--text text--darken-4"},[t._v(t._s(t.title))]),t.content?e(C["a"],{staticClass:"subtitle"},[t._v(t._s(t.content))]):t._e(),t.img?e(C["a"],[e("img",{attrs:{src:t.img}})]):t._e(),e(C["a"],[e(k["a"],{attrs:{depressed:"",round:"",outline:"",dark:"",large:"",color:"grey",ripple:!1},on:{click:function(e){return t.onClick(!1)}}},[t._v(t._s(t.cancel_txt))]),e(k["a"],{attrs:{depressed:"",round:"",dark:"",large:"",color:"primary",ripple:!1},on:{click:function(e){return t.onClick(!0)}}},[t._v(t._s(t.confirm_txt))])],1)],1)],1),"bottom"==t.position?e(z["a"],{staticClass:"safe-area-inset-bottom",attrs:{color:"transparent"}}):t._e()],1)]):t._e()],1)},Ct=[],jt={name:"SystemPopup",data:function(){return{visible:!1}},props:{position:{type:String,required:!0},title:{type:String,required:!0},content:{type:String,required:!1},confirm_txt:{type:String,required:!0},cancel_txt:{type:String,required:!0},img:{type:String,required:!1}},mounted:function(){var t=this;setTimeout((function(){t.visible=!t.visible}),0)},filters:{transition_name:function(t){switch(t){case"bottom":return"slide-in-up";case"top":return"slide-in-down"}},border_style:function(t){switch(t){case"bottom":return"border-top-radius";case"top":return"border-bottom-radius"}}},methods:{onClick:function(t){this.$emit("onClick",t),this.visible=!1},handleLeave:function(t){this.remove()}}},Ot=jt,Dt=(a("b875"),Object(E["a"])(Ot,wt,Ct,!1,null,"1a3fde9c",null)),Pt=Dt.exports,Mt=(a("df49"),a("291f"),a("031d")),St=a("63b4"),$t=a("1cc1"),Tt=a("df9a");Object(Tt["a"])(i["a"],Pt,["onClick"],!0),i["a"].use(Mt["a"]),i["a"].use(St["a"]),i["a"].use($t["a"]);var qt=a("bb71");a("c54a"),a("5363");i["a"].use(qt["a"],{iconfont:"mdi",theme:{primary:"#4B8CEC",secondary:"#adc3f0",error:"#E8484C"}});var Et=a("490a"),It=function(){var t=this,e=t._self._c;return e(O["a"],{class:{"inset-0":t.wrap},attrs:{"align-center":"","justify-center":""}},[e(Et["a"],{attrs:{indeterminate:"",color:"primary",size:"25"}})],1)},At=[],Bt={name:"LoadingSpace",props:{wrap:{require:!1,default:!1}}},Lt=Bt,Rt=Object(E["a"])(Lt,It,At,!1,null,null,null),Ht=Rt.exports,Nt=function(){var t=this,e=t._self._c;return e(O["a"],{staticClass:"grey--text",class:{"inset-0":t.wrap},attrs:{"align-center":"","justify-center":""}},[t._v("暂无")])},Ut=[],Ft={name:"EmptySpace",props:{wrap:{require:!1,default:!1}}},Yt=Ft,zt=Object(E["a"])(Yt,Nt,Ut,!1,null,null,null),Xt=zt.exports,Jt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"border-bottom-1px"},[e(z["a"],{staticClass:"safe-area-inset-top",attrs:{color:"transparent"}}),e(O["a"],{staticClass:"subheading relative subtitle px-1",staticStyle:{height:"46px"},attrs:{"align-center":""}},[e(C["a"],{attrs:{xs2:""}},[t.show_back?e(j["a"],{attrs:{color:"grey darken-3",medium:""},on:{click:t.onClickBack}},[t._v("mdi-chevron-left")]):t._e()],1),e(C["a"],{staticClass:"text-xs-center",attrs:{xs8:""}},[e("div",{staticClass:"letter-break",domProps:{innerHTML:t._s(t.bar_title?t.bar_title:t.title)}}),t._t("secondLine")],2),e(C["a"],{attrs:{xs2:""}},[t._t("rightSide")],2)],1)],1)},Wt=[],Gt={name:"NavigationBar",props:{show_back:{default:!0,type:Boolean,required:!1},bar_title:{default:"",type:String,required:!1}},computed:Object($["a"])({},Object(s["c"])("base",["title"])),methods:{onClickBack:function(){this.$vueAppEffect.back(this)}}},Kt=Gt,Qt=Object(E["a"])(Kt,Jt,Wt,!1,null,null,null),Vt=Qt.exports;function Zt(t){Zt.installed||(t.component("loading-space",Ht),t.component("empty-space",Xt),t.component("navigation-bar",Vt))}i["a"].use(Zt);var te=a("7496"),ee=function(){var t=this,e=t._self._c;return e(te["a"],{staticClass:"ssr"},[e("transition",{attrs:{name:t.direction.transitionName,css:!!t.direction.type}},[e("vnode-cache",[e("router-view",{staticClass:"router-view"})],1)],1)],1)},ae=[],ie=a("3cdb");i["a"].use(ie["a"],{router:ct,tabbar:["/Home","/My"]});var se={name:"App",data:function(){return{direction:{type:"",isTab:!1,transitionName:""}}},computed:Object($["a"])(Object($["a"])({},Object(s["c"])("base",["dialog","msg","platform"])),Object(s["c"])("user",["token"])),watch:{msg:function(t,e){if(t){var a=this.$createToast({time:2500,txt:t,type:"txt"});this.setMsg(""),a.show()}},dialog:function(t,e){if(t){var a=this.$createDialog({type:"alert",title:"提示",content:t});this.setDialog(""),a.show()}}},created:function(){var t=this,e=document.getElementById("app-loading");null!=e&&e.parentNode.removeChild(e),this.$vueAppEffect.on("forward",(function(e){t.direction=e})),this.$vueAppEffect.on("reverse",(function(e){t.direction=e}))},mounted:function(){this.$nextTick().then((function(){}))},methods:Object($["a"])(Object($["a"])({},Object(s["b"])("base",["setMsg","setDialog"])),Object(s["b"])("user",["setToken"]))},ne=se,re=(a("314a"),Object(E["a"])(ne,ee,ae,!1,null,null,null)),oe=re.exports;i["a"].config.productionTip=!1,i["a"].config.performance=!1,new i["a"]({store:x,router:ct,render:function(t){return t(oe)}}).$mount("#app")},"62b8":function(t,e,a){},8685:function(t,e,a){"use strict";a("62b8")},aa96:function(t,e,a){},b875:function(t,e,a){"use strict";a("d69f")},bbaa:function(t,e,a){"use strict";a("3f39")},c54a:function(t,e,a){},d69f:function(t,e,a){},e5d5:function(t,e,a){"use strict";a("2968")}});
//# sourceMappingURL=index.38a42596.js.map