vaneditor
Version:
``` 移动端ui框架统一用uView,css扩展语言用scss,全局数据管理vuex,统一样式主体风格颜色定义/src/uni.scss ```
1 lines • 17.4 kB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-beauty-order~pages-hotel-detail~pages-hotel-list~pages-route-detail~pages-route-order"],{"04bc":function(t,e,a){"use strict";a.r(e);var n=a("7ee0"),i=a.n(n);for(var c in n)"default"!==c&&function(t){a.d(e,t,(function(){return n[t]}))}(c);e["default"]=i.a},"50e8":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.value?a("v-uni-view",{staticClass:"projectileFrame",class:{leave:t.animation}},[a("div",{staticClass:"calendar"},[t.needBlank?a("div",{staticClass:"calendar-header"},[a("span",{staticClass:"title"},[t._v("选择日期")]),a("span",{staticClass:"close",on:{click:function(e){e=t.$handleEvent(e),t.close()}}},[t._v("X")])]):t._e(),a("div",{staticClass:"month"},t._l(t.allMonthData,(function(e,n){return a("div",{key:n,staticClass:"week-day",class:{active:t.active===n},on:{click:function(e){e=t.$handleEvent(e),t.changeMonth(n)}}},[t._v(t._s(e.month)+"月")])})),0),a("div",{staticClass:"week"},[a("div",{staticClass:"week-day weekend-day"},[t._v("日")]),a("div",{staticClass:"week-day"},[t._v("一")]),a("div",{staticClass:"week-day"},[t._v("二")]),a("div",{staticClass:"week-day"},[t._v("三")]),a("div",{staticClass:"week-day"},[t._v("四")]),a("div",{staticClass:"week-day"},[t._v("五")]),a("div",{staticClass:"week-day weekend-day"},[t._v("六")])]),a("div",{ref:"calendarWraper",staticClass:"calendar-content",class:{blank:t.needBlank}},[a("v-uni-scroll-view",{staticStyle:{height:"100%"},attrs:{"scroll-into-view":t.defaultOpenDate,"scroll-y":!0}},t._l(t.allMonthData,(function(e,n){return a("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:t.active==n,expression:"active==index"}],key:n,staticClass:"calendar-content-item",attrs:{id:"calendar-content-item"+(n+1)}},[a("ul",{staticClass:"calendar-content-day"},t._l(e.date,(function(n,i){return a("li",{key:i,staticClass:"day-item",class:{holiday:n.isWeekend,disable:n.isDisable,scope:t.isScope(e,n),lasts:t.isLast(e.date.length,i)},on:{click:function(a){a=t.$handleEvent(a),t.selectDate(e,n)}}},[a("div",{staticClass:"day-item-content",class:{InRange:n.isShow,CheckInDate:n.isCheckInDate,themeBackground:n.isCheckInDate||n.isCheckOutDate,CheckOutDate:n.isCheckOutDate,single:n.isCheckInDate&&"single"===t.pattern}},[a("p",{staticClass:"day-item-num"},[t._v(t._s(n.showDate))]),n.isShow?a("span",{staticClass:"day-item-price"},[t._v("¥"+t._s(n.saleSettlementPrice))]):t._e(),n.isCheckInDate&"single"!==t.pattern?a("p",{staticClass:"check-block holiday"},[t._v(t._s(t.startText))]):t._e(),n.isCheckOutDate&"single"!==t.pattern?a("p",{staticClass:"check-block holiday"},[t._v(t._s(t.endText))]):t._e(),n.isRestDay&&!n.isWeekend?a("p",{staticClass:"restDay"},[t._v("休")]):t._e()])])})),0),a("div",{staticClass:"calendar-content-division"})])})),1)],1),a("div",{staticClass:"step"},[t._t("step")],2),a("div",{staticClass:"calendar-foot"},[t._t("totlePirce"),a("div",{staticClass:"btn",on:{click:function(e){e=t.$handleEvent(e),t.determine(e)}}},[t._v("确定")])],2)])]):t._e()},i=[];a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return i}))},"6dba":function(t,e,a){var n=a("9ff7");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("4d546029",n,!0,{sourceMap:!1,shadowMode:!1})},"7ee0":function(t,e,a){"use strict";var n=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("ac4d"),a("8a81"),a("ac6a"),a("28a5"),a("a481");var i=n(a("f0ab")),c=n(a("5a0c")),o={props:{value:{type:Boolean,default:!1},animation:{type:Boolean,default:!1},info:{type:[Object,String],default:function(){return{checkInDate:"",checkOutDate:"",startDate:"",defaultOpenDate:""}}},range:{type:Array,default:function(){return[]}},rangeObj:{type:Object,default:function(){return{start:"",end:""}}},pattern:{type:String,default:"section"},startText:{type:String,default:"入住"},endText:{type:String,default:"离店"}},data:function(){return{active:0,needBlank:!0,isCheckComplete:!0,isRange:!1,inside:{checkInDate:"",checkOutDate:""},checkInDate:{date:{isCheckInDate:!1}},checkOutDate:{},allMonthData:[],rangs:[],now:""}},components:{uniIcons:i.default},computed:{currentStart:function(){return new Date(this.inside.checkInDate.replace(/-/gm,"/"))},currentEnd:function(){return new Date(this.inside.checkOutDate.replace(/-/gm,"/"))},defaultOpenDate:function(){var t=1,e=this.info.defaultOpenDate?this.info.defaultOpenDate.split("-")[1]:"";return e&&(t=e-this.allMonthData[0].month+1,t=t<=0?t+12:t),"calendar-content-item"+t}},mounted:function(){"section"===this.pattern?(this.initDate(),this.inside.checkInDate=this.info.checkInDate,this.inside.checkOutDate=this.info.checkOutDate):(this.checkInDate.date.isCheckInDate=!0,this.inside.checkInDate=this.info.checkInDate)},watch:{rangeObj:{handler:function(t){this.initDate()},deep:!0},info:{handler:function(t){t.checkInDate&&this.initDate(),t.startDate&&(this.inside.checkInDate=this.info.startDate)},deep:!0},range:function(t){this.initDate()}},methods:{initDate:function(){this.now=new Date,this.initCalendar()},initCalendar:function(){this.getAllMonthData(4);var t=this.info.checkInDate.split("-")[1],e=this.info.checkInDate.split("-")[2],a=!0,n=!1,i=void 0;try{for(var c,o=this.allMonthData[Symbol.iterator]();!(a=(c=o.next()).done);a=!0){var r=c.value;if(r.month+""===t){var d=!0,l=!1,s=void 0;try{for(var h,f=r.date[Symbol.iterator]();!(d=(h=f.next()).done);d=!0){var u=h.value;if(u.showDate+""===e){u.isCheckInDate=!0,this.checkInDate={month:r,date:u};break}}}catch(w){l=!0,s=w}finally{try{d||null==f.return||f.return()}finally{if(l)throw s}}}if("section"===this.pattern){var m=this.info.checkOutDate.split("-")[1],k=this.info.checkOutDate.split("-")[2];if(r.month+""===m){var v=!0,D=!1,y=void 0;try{for(var g,b=r.date[Symbol.iterator]();!(v=(g=b.next()).done);v=!0){var p=g.value;if(p.showDate+""===k){p.isCheckOutDate=!0,this.checkOutDate={month:r,date:p};break}}}catch(w){D=!0,y=w}finally{try{v||null==b.return||b.return()}finally{if(D)throw y}}break}}}}catch(w){n=!0,i=w}finally{try{a||null==o.return||o.return()}finally{if(n)throw i}}},isLast:function(t,e){var a=parseInt(t/7);return(e+1)/7>a},isScope:function(t,e){var a=new Date(t.year+"/"+t.month+"/"+e.dates);return this.currentStart<a&&a<this.currentEnd&&this.isCheckComplete},close:function(){this.$emit("on-close")},determine:function(){this.$emit("on-determine",this.inside)},getMonthData:function(t,e){var a=[];if(!t||!e){var n=this.now;t=n.getFullYear(),e=n.getMonth()+1}for(var i=new Date(t,e-1,1),c=i.getDay(),o=i.getDay(),r=o-1,d=new Date(t,e,0),l=d.getDate(),s=0;s<38;s++){var h=s-r,f=h;if(h<=0)f="";else if(h>l)continue;var u=!1;(f+c)%7!==0&&(f+c)%7!==1||(u=!0);var m=!1;a.push({showDate:f,dates:f,isWeekend:u,isCheckInDate:!1,isCheckOutDate:!1,isRestDay:m,isShow:!1})}return a},createTemp:function(t){for(var e=this.now,a=e.getFullYear(),n=e.getMonth()+1,i=[],c=0;c<t;c++)n>12&&(a+=1,n=1),i[c]={year:a,month:n,date:this.getMonthData(a,n)},n+=1;return i},createRange:function(t){var e=[];if(this.rangeObj.start&&this.rangeObj.end){var a=new Date(this.rangeObj.start.replace(/-/gm,"/")),n=new Date(this.rangeObj.end.replace(/-/gm,"/"));while(a.getTime()<=n.getTime())e.push({date:(0,c.default)(a).format("YYYY-M-D"),type:"ticket"}),a.setDate(a.getDate()+1);this.isRange=!0}else this.range.length>0&&(e=this.range,this.isRange=!0);this.rangs=e},getAllMonthData:function(t){var e=this,a=this.createTemp(t);if(this.createRange(),this.isRange)for(var n=function(t){a[t].date.forEach((function(n){n.isDisable=!0;var i=a[t].year+"-"+a[t].month+"-"+n.showDate;e.rangs.forEach((function(t){t.date===i&&(n.isDisable=!1),t.date===i&&"ticket"!==t.type&&(n.isShow=!0,n.stock=t.stock,n.saleSettlementPrice=t.saleSettlementPrice,n.childSettlementPrice=t.childSettlementPrice)}))}))},i=0;i<t;i++)n(i);else{var c=this.info.startDate?this.info.startDate.split("-")[2]:"";c&&(c=parseInt(c));var o=!0,r=!1,d=void 0;try{for(var l,s=a[0].date[Symbol.iterator]();!(o=(l=s.next()).done);o=!0){i=l.value;var h=this.now;if(i.showDate>h.getDate()||i.showDate===h.getDate()&&h.getHours()<23){if(!c)break;if(i.showDate>=c)break}i.isDisable=!0}}catch(f){r=!0,d=f}finally{try{o||null==s.return||s.return()}finally{if(r)throw d}}}this.allMonthData=a},selectDate:function(t,e){e.isDisable||("section"===this.pattern?(this.checkInDate.date.isCheckInDate&&this.checkOutDate.date.isCheckOutDate?(this.isCheckComplete=!1,this.checkInDate.date.isCheckInDate=!1,this.checkOutDate.date.isCheckOutDate=!1,e.isCheckInDate=!0,this.checkInDate={date:e,month:t}):this.checkInDate.date.isCheckInDate&&!this.checkOutDate.date.isCheckOutDate&&(t.year>this.checkInDate.month.year||t.year===this.checkInDate.month.year&&t.month>this.checkInDate.month.month||t.year===this.checkInDate.month.year&&t.month===this.checkInDate.month.month&&e.showDate>this.checkInDate.date.showDate?(this.isCheckComplete=!1,e.isCheckOutDate=!0,e.isCheckInDate=!1,this.checkOutDate={date:e,month:t}):(this.checkInDate.date.isCheckInDate=!1,e.isCheckInDate=!0,this.checkInDate={date:e,month:t})),this.checkInDate.date.isCheckInDate&&this.checkOutDate.date.isCheckOutDate&&(this.isCheckComplete=!0,this.inside.checkInDate=this.checkInDate.month.year+"-"+this.checkInDate.month.month+"-"+this.checkInDate.date.showDate,this.inside.checkOutDate=this.checkOutDate.month.year+"-"+this.checkOutDate.month.month+"-"+this.checkOutDate.date.showDate)):(this.isCheckComplete=!1,this.checkInDate.date.isCheckInDate=!1,e.isCheckInDate=!0,this.checkInDate={date:e,month:t},this.inside.checkInDate=t.year+"-"+t.month+"-"+e.showDate,this.$emit("activeDay",this.checkInDate)))},changeMonth:function(t){this.active=t}}};e.default=o},"9ff7":function(t,e,a){e=t.exports=a("2350")(!1),e.push([t.i,".projectileFrame[data-v-1860f13c]{overflow:hidden;position:fixed;width:100%;bottom:%?0?%;background-color:#fff;height:%?1068?%;-webkit-animation:enter-data-v-1860f13c .3s;animation:enter-data-v-1860f13c .3s;-webkit-animation-iteration-count:1;animation-iteration-count:1;z-index:1000;box-sizing:border-box}.leave[data-v-1860f13c]{-webkit-animation:leave-data-v-1860f13c .3s;animation:leave-data-v-1860f13c .3s;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes leave-data-v-1860f13c{0%{bottom:%?0?%}to{bottom:%?-1068?%}}@keyframes leave-data-v-1860f13c{0%{bottom:%?0?%}to{bottom:%?-1068?%}}@-webkit-keyframes enter-data-v-1860f13c{0%{bottom:%?-1068?%}to{bottom:%?0?%}}@keyframes enter-data-v-1860f13c{0%{bottom:%?-1068?%}to{bottom:%?0?%}}.calendar .calendar-header[data-v-1860f13c]{position:absolute;width:%?750?%;text-align:center;background-color:#fff;height:%?90?%;bottom:%?978?%;line-height:%?90?%;font-size:%?34?%;color:#333;font-weight:600}.calendar .calendar-header .title[data-v-1860f13c]{font-size:%?34?%;color:#333}.calendar .calendar-header .close[data-v-1860f13c]{position:absolute;right:%?20?%;line-height:%?90?%;top:0;color:#666;z-index:9999;font-size:%?28?%}.calendar .month[data-v-1860f13c]{position:absolute;bottom:%?900?%;width:%?750?%;display:-webkit-flex;display:flex;background-color:#fff;height:%?60?%;line-height:%?60?%;border-bottom:1px solid #eaeaea}.calendar .month .week-day[data-v-1860f13c]{-webkit-flex:1;flex:1;color:#999;font-size:%?30?%;font-weight:600;text-align:center}.calendar .month .week-day.active[data-v-1860f13c]{color:#222}.calendar .week[data-v-1860f13c]{position:absolute;bottom:%?830?%;width:%?750?%;display:-webkit-flex;display:flex;background-color:#fff;height:%?60?%;line-height:%?60?%;border-bottom:1px solid #eaeaea}.calendar .week .week-day[data-v-1860f13c]{-webkit-flex:1;flex:1;color:#999;font-size:%?30?%;font-weight:600;text-align:center}.calendar .week .weekend-day[data-v-1860f13c]{color:#222}.calendar .blank[data-v-1860f13c]{margin-top:%?94?%}.calendar .calendar-content[data-v-1860f13c]{position:absolute;bottom:%?0?%;width:100%;max-width:%?750?%;overflow:hidden;font-size:%?24?%;height:%?830?%}.calendar .calendar-content .scroll-Y[data-v-1860f13c]{height:%?8538?%}.calendar .calendar-content .calendar-content-item .calendar-content-title[data-v-1860f13c]{width:100%;text-align:center;height:%?92.25?%;line-height:%?92.25?%;font-size:%?27?%;font-weight:600;letter-spacing:%?3?%;border-bottom:1px solid #eaeaea;background-color:#fff}.calendar .calendar-content .calendar-content-item .calendar-content-day[data-v-1860f13c]{background:#fff;overflow:hidden}.calendar .calendar-content .calendar-content-item .calendar-content-day[data-v-1860f13c]:last-of-type{margin-bottom:%?335?%}.calendar .calendar-content .calendar-content-item .calendar-content-day .holiday[data-v-1860f13c]{color:#f28300}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item[data-v-1860f13c]{box-sizing:border-box;position:relative;float:left;width:14.2%;height:%?130?%;color:#333;font-weight:600;text-align:center;border-bottom:1px solid #eaeaea}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item.lasts[data-v-1860f13c]{border-bottom-width:%?0?%}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .day-item-content[data-v-1860f13c]{font-size:%?30?%;line-height:%?43.5?%;width:100%;height:100%;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .day-item-content .day-item-num[data-v-1860f13c]{color:#333;line-height:%?130?%;margin:0;font-size:%?28?%}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .InRange[data-v-1860f13c]{font-size:.3em}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .InRange .day-item-num[data-v-1860f13c]{color:#333!important;line-height:%?43.5?%}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .InRange .day-item-price[data-v-1860f13c]{display:block;height:%?20.25?%;line-height:%?20.25?%;font-size:%?22?%;width:100%;color:#868686;margin-bottom:%?7.5?%;font-weight:400}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .InRange .day-item-left[data-v-1860f13c]{display:block;height:%?20.25?%;line-height:%?20.25?%;font-size:%?24?%;width:100%;color:#555;font-weight:400}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .CheckInDate[data-v-1860f13c],.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .CheckOutDate[data-v-1860f13c]{color:#fff;background-color:#ff740b;overflow:hidden}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .CheckInDate .day-item-num[data-v-1860f13c],.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .CheckOutDate .day-item-num[data-v-1860f13c]{color:#fff;line-height:%?43.5?%}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .CheckInDate .day-item-price[data-v-1860f13c],.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .CheckOutDate .day-item-price[data-v-1860f13c]{color:#333}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .CheckInDate.single[data-v-1860f13c]{background-color:#ffc090;border:1px solid #c85803;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .check-block[data-v-1860f13c]{display:block;height:%?20.25?%;line-height:%?20.25?%;font-size:%?24?%;color:#fff}.calendar .calendar-content .calendar-content-item .calendar-content-day .day-item .restDay[data-v-1860f13c]{position:absolute;top:%?15?%;right:0;font-size:%?24?%;color:#fff}.calendar .calendar-content .calendar-content-item .calendar-content-day .scope[data-v-1860f13c]{background-color:#ffb47c;font-weight:400}.calendar .calendar-content .calendar-content-item .calendar-content-day .scope .restDay[data-v-1860f13c]{color:#484848}.calendar .calendar-content .calendar-content-item .calendar-content-day .disable[data-v-1860f13c]{color:#dadada}.calendar .calendar-content .calendar-content-item .calendar-content-day .disable .day-item-content .day-item-num[data-v-1860f13c]{color:#dadada}.calendar .calendar-content .calendar-content-item .calendar-content-division[data-v-1860f13c]{width:100%;height:%?30?%}.calendar .calendar-foot[data-v-1860f13c]{position:absolute;bottom:0;width:100%;text-align:center;padding:%?30?% 0;background-color:#fff;border-radius:2px;box-shadow:0 %?-10?% %?14?% 0 rgba(0,0,0,.07)}.calendar .calendar-foot .btn[data-v-1860f13c]{display:inline-block;text-align:center;font-size:%?40.5?%;background-color:#ff740b;color:#fff;width:90%;max-width:%?675?%;height:%?75?%;line-height:%?75?%;border-radius:%?6?%}",""])},b15c:function(t,e,a){"use strict";a.r(e);var n=a("50e8"),i=a("04bc");for(var c in i)"default"!==c&&function(t){a.d(e,t,(function(){return i[t]}))}(c);a("f180");var o=a("2877"),r=Object(o["a"])(i["default"],n["a"],n["b"],!1,null,"1860f13c",null);e["default"]=r.exports},f180:function(t,e,a){"use strict";var n=a("6dba"),i=a.n(n);i.a}}]);