webpackJsonp([2],{47:function(t,e,o){o(58);var i=o(19)(o(53),o(64),"data-v-2e56d9ac",null);i.options.__file="E:\\git_project\\backups_source\\标准版敏卓触摸版\\src\\views\\order.vue",i.esModule&&Object.keys(i.esModule).some(function(t){return"default"!==t&&"__esModule"!==t})&&console.error("named exports are not supported in *.vue files."),i.options.functional&&console.error("[vue-loader] order.vue: functional components are not supported with templates, they should use render functions."),t.exports=i.exports},49:function(t,e,o){"use strict";function i(t,e){function o(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function s(t){console.error("[BScroll warn]: "+t)}function n(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function r(t){for(var e=[],o=1;o0,M=E&&document.createElement("div").style,Y=function(){if(!E)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var e in t)if(void 0!==M[t[e]])return e;return!1}(),L=(Y&&"standard"!==Y&&Y.toLowerCase(),c("transform")),X=c("transition"),z=E&&c("perspective")in M,H=E&&("ontouchstart"in window||C),O=E&&X in M,I={transform:L,transition:X,transitionTimingFunction:c("transitionTimingFunction"),transitionDuration:c("transitionDuration"),transitionDelay:c("transitionDelay"),transformOrigin:c("transformOrigin"),transitionEnd:c("transitionEnd")},R={touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2},j=f,A={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},$=E&&window,N=function(){return E?$.requestAnimationFrame||$.webkitRequestAnimationFrame||$.mozRequestAnimationFrame||$.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:g}(),F=function(){return E?$.cancelAnimationFrame||$.webkitCancelAnimationFrame||$.mozCancelAnimationFrame||$.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:g}(),K=function(t){},q={enumerable:!0,configurable:!0,get:K,set:K},V=function(t,e){for(var o=e.split("."),i=0;idocument.documentElement.clientWidth-this.options.momentumLimitDistance||rdocument.documentElement.clientHeight-this.options.momentumLimitDistance)&&this.end(t)}}},t.prototype.end=function(t){R[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},t.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},t.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},t}(),ht={x:["translateX","px"],y:["translateY","px"]},lt=function(){function t(t){this.content=t,this.style=t.style,this.hooks=new U(["beforeTranslate","translate"])}return t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null),e=t[I.transform].split(")")[0].split(", ");return{x:+(e[12]||e[4]),y:+(e[13]||e[5])}},t.prototype.translate=function(t){var e=[];Object.keys(t).forEach(function(o){if(ht[o]){var i=ht[o][0];if(i){var s=ht[o][1],n=t[o];e.push(i+"("+n+s+")")}}}),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[I.transform]=""+e.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},t.prototype.destroy=function(){this.hooks.destroy()},t}(),ut=function(){function t(t,e,o){this.content=t,this.translater=e,this.options=o,this.hooks=new U(["move","end","beforeForceStop","forceStop","time","timeFunction"]),this.style=t.style}return t.prototype.translate=function(t){this.translater.translate(t)},t.prototype.setPending=function(t){this.pending=t},t.prototype.setForceStopped=function(t){this.forceStopped=t},t.prototype.destroy=function(){this.hooks.destroy(),F(this.timer)},t}(),pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.startProbe=function(){var t=this,e=function(){var o=t.translater.getComputedPosition();if(t.hooks.trigger(t.hooks.eventTypes.move,o),!t.pending)return void t.hooks.trigger(t.hooks.eventTypes.end,o);t.timer=N(e)};F(this.timer),this.timer=N(e)},e.prototype.transitionTime=function(t){void 0===t&&(t=0),this.style[I.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[I.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.move=function(t,e,o,i,s){this.setPending(o>0&&(t.x!==e.x||t.y!==e.y)),this.transitionTimingFunction(i),this.transitionTime(o),this.translate(e),o&&this.options.probeType===tt.Realtime&&this.startProbe(),o||(this._reflow=this.content.offsetHeight),o||s||(this.hooks.trigger(this.hooks.eventTypes.move,e),this.hooks.trigger(this.hooks.eventTypes.end,e))},e.prototype.stop=function(){if(this.pending){this.setPending(!1),F(this.timer);var t=this.translater.getComputedPosition(),e=t.x,o=t.y;if(this.transitionTime(),this.translate({x:e,y:o}),this.setForceStopped(!0),this.hooks.trigger(this.hooks.eventTypes.beforeForceStop,{x:e,y:o}))return;this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:e,y:o})}},e}(ut),dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.move=function(t,e,o,i,s){if(!o){if(this.translate(e),this._reflow=this.content.offsetHeight,s)return;return this.hooks.trigger(this.hooks.eventTypes.move,e),void this.hooks.trigger(this.hooks.eventTypes.end,e)}this.animate(t,e,o,i)},e.prototype.animate=function(t,e,o,i){var s=this,r=n(),a=r+o,c=function(){var h=n();if(h>=a)return s.translate(e),s.hooks.trigger(s.hooks.eventTypes.move,e),void s.hooks.trigger(s.hooks.eventTypes.end,e);h=(h-r)/o;var l=i(h),u={};Object.keys(e).forEach(function(o){var i=t[o],s=e[o];u[o]=(s-i)*l+i}),s.translate(u),s.pending&&(s.timer=N(c)),s.options.probeType===tt.Realtime&&s.hooks.trigger(s.hooks.eventTypes.move,u)};this.setPending(!0),F(this.timer),c()},e.prototype.stop=function(){if(this.pending){this.setPending(!1),F(this.timer);var t=this.translater.getComputedPosition();if(this.setForceStopped(!0),this.hooks.trigger(this.hooks.eventTypes.beforeForceStop,t))return;this.hooks.trigger(this.hooks.eventTypes.forceStop,t)}},e}(ut),ft=function(){function t(t,e){this.wrapper=t,this.options=e,this.hooks=new U(["momentum","end"]),this.content=this.wrapper.children[0],this.currentPos=0,this.startPos=0}return t.prototype.start=function(){this.direction=P.Default,this.movingDirection=P.Default,this.dist=0},t.prototype.move=function(t){t=this.hasScroll?t:0,this.movingDirection=t>0?P.Negative:t<0?P.Positive:P.Default;var e=this.currentPos+t;return(e>this.minScrollPos||ethis.minScrollPos&&this.options.bounces[0]||ethis.minScrollPos?this.minScrollPos:this.maxScrollPos),e},t.prototype.end=function(t){var e={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&tthis.options.momentumLimitDistance){var i=this.direction===P.Negative&&this.options.bounces[0]||this.direction===P.Positive&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,i,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},t.prototype.momentum=function(t,e,o,i,s,n,r){void 0===r&&(r=this.options);var a=t-e,c=Math.abs(a)/o,h=r.deceleration,l=r.swipeBounceTime,u=r.swipeTime,p={destination:t+c/h*(a<0?-1:1),duration:u,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,p,a),p.destinations&&(p.destination=n?Math.min(s+n/4,s+n/p.rate*c):s,p.duration=l),p.destination=Math.round(p.destination),p},t.prototype.updateDirection=function(){var t=Math.round(this.currentPos)-this.absStartPos;this.direction=t>0?P.Negative:t<0?P.Positive:P.Default},t.prototype.refresh=function(){var t=this.options.rect,e=t.size,o=t.position,i="static"===window.getComputedStyle(this.wrapper,null).position,s=d(this.wrapper);this.wrapperSize=s[e];var n=d(this.content);this.contentSize=n[e],this.relativeOffset=n[o],i&&(this.relativeOffset-=s[o]),this.minScrollPos=0,this.maxScrollPos=this.wrapperSize-this.contentSize,this.maxScrollPos<0&&(this.maxScrollPos-=this.relativeOffset,this.minScrollPos=-this.relativeOffset),this.hasScroll=this.options.scrollable&&this.maxScrollPosthis.minScrollPos?e=this.minScrollPos:ee+this.directionLockThreshold?this.directionLocked=Z.Horizontal:e>=t+this.directionLockThreshold?this.directionLocked=Z.Vertical:this.directionLocked=Z.None)},t.prototype.handleEventPassthrough=function(t){var e=yt[this.directionLocked];if(e){if(this.eventPassthrough===e[nt.Yes])return vt[nt.Yes](t);if(this.eventPassthrough===e[nt.No])return vt[nt.No](t)}return!1},t}(),kt=function(){function t(t,e,o,i,s){this.hooks=new U(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=i,this.options=s,this.directionLockAction=new gt(s.directionLockThreshold,s.freeScroll,s.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return t.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,function(e){return!t.enabled||t.handleStart(e)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,function(e){var o=e.deltaX,i=e.deltaY,s=e.e;return!t.enabled||t.handleMove(o,i,s)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,function(e){return!t.enabled||t.handleEnd(e)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,function(e){t.enabled&&!e._constructed&&t.handleClick(e)})},t.prototype.handleStart=function(t){var e=n();this.moved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.stop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},t.prototype.handleMove=function(t,e,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var i=this.scrollBehaviorX.getAbsDist(t),s=this.scrollBehaviorY.getAbsDist(e),r=n();if(this.checkMomentum(i,s,r))return!0;if(this.directionLockAction.checkMovingDirection(i,s,o))return this.actionsHandler.setInitiated(),!0;var a=this.directionLockAction.adjustDelta(t,e),c=this.scrollBehaviorX.move(a.deltaX),h=this.scrollBehaviorY.move(a.deltaY);this.moved||(this.moved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.animater.translate({x:c,y:h}),this.dispatchScroll(r)}},t.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),this.options.probeType===tt.Throttle&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>tt.Throttle&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},t.prototype.checkMomentum=function(t,e,o){return o-this.endTime>this.options.momentumLimitTime&&e1&&tthis.scrollBehaviorX.minScrollPos||o.newXthis.scrollBehaviorY.minScrollPos||o.newY=i?o:i,(t*s-e*s)/s},goBack:function(){this.$store.commit("setToken",null),this.$store.commit("setCount",0),this.$router.replace({path:"index"})},changeFt:function(t){this.$store.commit("setLoading",!0);var e=this;this.$ajax.post("/api/user/alter/",{dining_hall_id:t,token:this.$store.state.token}).then(function(t){if(e.$store.commit("setLoading",!1),1===t.data.status)return e.getData(),0;-1===t.data.status?e.goBack():e.$Message.error({content:t.data.message,top:30,duration:3})}).catch(function(t){e.$store.commit("setLoading",!1);var o="";o=t.response?"请求服务器失败":t.request?"等待回复失败":"系统解析出错",e.$Message.error({content:o,top:30,duration:3})})},changeDinner:function(t){this.operate_add_time(),this.getData(t)},changeMeal:function(t,e,o){if("add"===e&&parseInt(this.dateData.cs[t].csnum)0))return 0;this.dateData.cs[t].csnum--,this.dateData.order.price=this.minus(this.dateData.cs[t].csprice,this.dateData.order.price)}var i=this.dateData.cs[t].csnum;this.$store.commit("setLoading",!0);var s=this;this.$ajax.post("/api/dishes/add/",{date_dish_id:o,num:i,token:this.$store.state.token}).then(function(o){if(s.$store.commit("setLoading",!1),1===o.data.status)return s.dateData.order.price=o.data.data.cart.price,s.dateData.order.num=parseInt(o.data.data.cart.orderNum),s.dateData.cs[t].csnum=parseInt(o.data.data.cart.csnum),0;-1===o.data.status?s.goBack():s.$Message.error({content:o.data.message,top:30,duration:3}),"add"===e?(s.dateData.cs[t].csnum--,s.dateData.order.price=s.minus(s.dateData.cs[t].csprice,s.dateData.order.price)):"minus"===e&&(s.dateData.cs[t].csnum++,s.dateData.order.price=s.add(s.dateData.cs[t].csprice,s.dateData.order.price))}).catch(function(o){s.$store.commit("setLoading",!1);var i="";i=o.response?"请求服务器失败":o.request?"等待回复失败":"系统解析出错","add"===e?(s.dateData.cs[t].csnum--,s.dateData.order.price=s.minus(s.dateData.cs[t].csprice,s.dateData.order.price)):"minus"===e&&(s.dateData.cs[t].csnum++,s.dateData.order.price=s.add(s.dateData.cs[t].csprice,s.dateData.order.price)),s.$Message.error({content:i,top:30,duration:3})})},getData:function(t){this.$store.commit("setLoading",!0);var e=this;this.$ajax.get("/api/dishes/index",{params:{token:e.$store.state.token,date_id:t}}).then(function(t){if(e.$store.commit("setLoading",!1),1===t.data.status){e.username=t.data.data.user.username,e.account=t.data.data.user.account,e.jf=t.data.data.user.jf,e.dateData.cs=t.data.data.cs,e.dateData.jctime=t.data.data.jctime2,e.dateData.page=t.data.data.page,e.dateData.order=t.data.data.order,e.dateData.dining_hall_id=t.data.data.dining_hall_id,e.dateData.dining_halls=t.data.data.dining_halls;var o=t.data.data.jctime2,i="";for(var s in o){var n=o[s].date;if(-1!=t.data.data.page.indexOf(n)){n,i=o[s];break}}if(i!=[]){var r=[];for(var a in i.data)-1!=t.data.data.page.indexOf(i.data[a].name)?r.push({name:i.data[a].name,type:"primary",date_id:i.data[a].id}):r.push({name:i.data[a].name,type:"default",date_id:i.data[a].id})}e.meal_btn=r}else-1===t.data.status&&e.goBack()}).catch(function(t){e.$store.commit("setLoading",!1);var o="";o=t.response?"请求服务器失败":t.request?"等待回复失败":"系统解析出错",e.$Message.error({content:o,top:30,duration:3})})},autoSetLayoutMainHeight:function(){var t=document.querySelector(".layout-menu-left"),e=document.querySelector(".layout-content"),o=document.querySelector(".layout-header"),i=document.querySelector(".layout-copy");t.style.height="auto";var s=document.body.clientHeight;t.offsetHeight x '+e[i].num+"

";this.$Modal.info({title:"

"+t+" (套餐详情)

",content:o})}}}},58:function(t,e){},64:function(t,e,o){t.exports={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"layout order"},[t.$store.state.loading?o("Spin",{attrs:{size:"large",fix:""}}):t._e(),t._v(" "),o("Row",{attrs:{type:"flex"}},[o("Col",{staticClass:"layout-menu-left",attrs:{span:"5"}},[o("Menu",{attrs:{width:"auto"}},[o("Row",[o("h2",[t._v("个人信息")])]),t._v(" "),o("Row",[o("Icon",{attrs:{type:"person",size:t.iconSize,color:t.menuIconColor}}),t._v(" "),o("span",{staticClass:"layout-text"},[t._v(t._s(t.username))])],1),t._v(" "),o("Row",[o("Icon",{attrs:{type:"cash",size:t.iconSize,color:t.menuIconColor}},[t._v("资产")]),t._v(" "),o("span",{staticClass:"layout-text"},[t._v("余额"),o("i",[t._v("¥")]),t._v(" "+t._s(t.account))])],1),t._v(" "),o("Row",[o("Icon",{attrs:{type:"cash",size:t.iconSize,color:t.menuIconColor}},[t._v("福利")]),t._v(" "),o("span",{staticClass:"layout-text"},[t._v("福利"),o("i",[t._v("¥")]),t._v(" "+t._s(t.jf))])],1)],1),t._v(" "),t._l(t.dateData.dining_halls,function(e,i){return o("RadioGroup",{key:e.id,attrs:{size:"large",vertical:""},on:{"on-change":t.changeFt},model:{value:t.dateData.dining_hall_id,callback:function(e){t.$set(t.dateData,"dining_hall_id",e)},expression:"dateData.dining_hall_id"}},[o("Radio",{attrs:{label:e.id}},[o("span",[t._v(t._s(e.name))])])],1)}),t._v(" "),o("div",{staticClass:"ivu-menu-botton-row"},[o("Button",{attrs:{type:"primary",long:""},on:{click:t.goBack}},[t._v("后退("+t._s(t.$store.state.count)+"s)")])],1)],2),t._v(" "),o("Col",{attrs:{span:"19"}},[o("div",{staticClass:"layout-header"},[o("Row",[o("Col",{attrs:{span:"4"}},[t._v("订餐日期")]),t._v(" "),o("Col",{attrs:{span:"10"}},[o("Dropdown",{attrs:{trigger:"click"}},[o("a",{attrs:{href:"javascript:void(0)"},domProps:{innerHTML:t._s(t.dateData.page.replace(/
/g,""))}},[o("Icon",{attrs:{type:"arrow-down-b"}})],1),t._v(" "),o("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.dateData.jctime,function(e){return o("div",{on:{click:function(o){return t.changeDinner(e.data[0].id)}}},[(e.data,[o("DropdownItem",{staticStyle:{"text-align":"center"}},[t._v("\n "+t._s(e.date)+"("+t._s(e.weekday)+")\n ")])])],2)}),0)],1)],1)],1)],1),t._v(" "),o("div",{staticClass:"breadcrumb_btn"},[o("Breadcrumb",[t._l(t.meal_btn,function(e){return[o("Button",{attrs:{type:e.type,size:"large"},domProps:{innerHTML:t._s(e.name.replace(/
/g,""))},on:{click:function(o){return t.changeDinner(e.date_id)}}},[t._v("{{}}")])]})],2)],1),t._v(" "),o("div",{ref:"scroll",staticClass:"layout-content scroll-wrapper"},[o("div",{staticClass:"layout-content-main scroll-content"},[o("div",{staticClass:"item-content"},[o("Row",t._l(t.dateData.cs,function(e,i){return o("Col",{key:e.csid,staticClass:"scroll-item",attrs:{span:"12"}},[o("div",{staticStyle:{display:"flex"}},[o("div",{staticClass:"item-media"},[o("img",{attrs:{alert:"加载失败",onError:"this.onerror=null;this.src='http://36.111.42.57:8081/m/img/noimage.png';",src:e.image}})]),t._v(" "),o("div",{staticClass:"item-inner"},[o("div",{staticClass:"item-title-row"},[o("div",{staticClass:"item-title",staticStyle:{"-webkit-box-orient":"vertical"},domProps:{innerHTML:t._s(e.csname.toString().split("
")[0])}})]),t._v(" "),o("div",{staticClass:"item-text price"},[o("i",{staticClass:"pi"},[t._v("¥")]),t._v(t._s(e.csprice)+"元/份")]),t._v(" "),o("div",{staticClass:"item-text kc"},[t._v("剩"+t._s("-1"===e.rest_num?"999+":e.rest_num)+"/"+t._s("0"===e.total_max_num?"999+":e.total_max_num))]),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:e.is_set_meal,expression:"meal.is_set_meal"}],staticClass:"item-text dc_detail",staticStyle:{width:"100%"}},[o("span",{staticStyle:{display:"inline-block","font-size":"13px","white-space":"initial",position:"absolute",bottom:"0.2rem",width:"130%",left:"0",top:"-1.2rem"}},[o("strong",[t._v("套餐详情:")]),t._v(" "),t._l(e.set_meal,function(e,i){return[o("small",{directives:[{name:"show",rawName:"v-show",value:0!=i,expression:"index!=0"}]},[t._v(",")]),t._v(t._s(e.dish_name)+"\n")]})],2)])]),t._v(" "),o("div",{staticClass:"item-operator"},[o("p",{staticClass:"buttons-row",attrs:{limit:e.limit,price:e.csprice}},[o("a",{directives:[{name:"visible",rawName:"v-visible",value:0!==e.csnum,expression:"meal.csnum !== 0"}],staticClass:"button button-link button-nav minus",on:{click:function(o){return t.changeMeal(i,"minus",e.date_dish_id)}}},[o("Icon",{attrs:{type:"minus-circled"}})],1),t._v(" "),o("a",{directives:[{name:"visible",rawName:"v-visible",value:0!==e.csnum,expression:"meal.csnum !== 0"}],staticClass:"button button-link button-nav num",attrs:{href:"javascript:;"}},[t._v(t._s(e.csnum))]),t._v(" "),o("a",{directives:[{name:"visible",rawName:"v-visible",value:e.csnum