|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{278:function(e,t,n){"use strict";(function(e){n(5);o(n(3));var t=o(n(279));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n(1)["createPage"])},279:function(e,t,n){"use strict";n.r(t);var o=n(280),r=n(282);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);n(284);var i,c=n(15),u=Object(c["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],i);u.options.__file="pages/index/index.vue",t["default"]=u.exports},280:function(e,t,n){"use strict";n.r(t);var o=n(281);n.d(t,"render",(function(){return o["render"]})),n.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(t,"components",(function(){return o["components"]}))},281:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return r})),n.d(t,"staticRenderFns",(function(){return i})),n.d(t,"recyclableRender",(function(){return a})),n.d(t,"components",(function(){return o}));try{o={uNoticeBar:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-notice-bar/u-notice-bar")]).then(n.bind(null,398))},uPopup:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(n.bind(null,406))},uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,414))},uButton:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-button/u-button")]).then(n.bind(null,423))},uCalendar:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-calendar/u-calendar")]).then(n.bind(null,433))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var e=this,t=e.$createElement;e._self._c},a=!1,i=[];r._withStripped=!0},282:function(e,t,n){"use strict";n.r(t);var o=n(283),r=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=r.a},283:function(e,t,n){"use strict";(function(e){function n(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){u=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(u)throw i}}}}function o(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a={data:function(){var e=new Date,t=e.getFullYear(),n=e.getMonth()+1;n=n<10?"0".concat(n):n;var o=e.getDate();return{showInfo:!1,showBook:!1,minDate:"".concat(t,"-").concat(n,"-").concat(o+1),maxDate:"".concat(t,"-").concat(n,"-").concat(o+7),showCalendar:!1,list:["寒雨连江夜入吴","平明送客楚山孤","洛阳亲友如相问","一片冰心在玉壶"],info:{},listDatePrice:[],currentDate:{},currentTime:{},currentIndex:0,listCalendar:[]}},onLoad:function(){this.loadInfo()},onReady:function(){this.$refs.calendar.setFormatter(this.formatter)},methods:{closecalendar:function(){this.showCalendar=!1},handleSelectDate:function(e){console.log(e),0!=e.length&&e[0]!=this.currentDate.date&&(this.load3Day(e[0]),this.showCalendar=!1)},openCalendar:function(){var e=this,t=this.$moment().add("days",7).format("yyyy-MM-DD"),n=this.$moment().add("days",1).format("yyyy-MM-DD");this.loadCalendar(n,t,(function(t){e.listCalendar=t,e.showCalendar=!0}))},formatter:function(e){var t,o=n(this.listCalendar);try{for(o.s();!(t=o.n()).done;){var r=t.value,a=this.$moment(e.date).format("yyyy-MM-DD");a==r.date&&(1==r.is_open?e.bottomInfo="余票":e.bottomInfo="售罄")}}catch(i){o.e(i)}finally{o.f()}return e},handleDate:function(t){var o=this.$moment().format("yyyy-MM-DD"),r=this.listDatePrice,a=r[t];if(o!=a.date){var i,c=n(r);try{for(c.s();!(i=c.n()).done;){var u=i.value;u.checked=!1}}catch(f){c.e(f)}finally{c.f()}a.checked=!0;var s,l=0,d=n(a.rules);try{for(d.s();!(s=d.n()).done;){u=s.value;u.checked=!1,u.checked=0==l,u.checked&&(this.currentTime=u),l++}}catch(f){d.e(f)}finally{d.f()}this.currentDate=a,this.listDatePrice=r,this.$forceUpdate()}else e.showToast({icon:"none",title:"请提前一天预约"})},handleSelectTime:function(e){var t,o=n(this.currentDate.rules);try{for(o.s();!(t=o.n()).done;){var r=t.value;r.checked=!1}}catch(a){o.e(a)}finally{o.f()}this.currentDate.rules[e].checked=!0,this.currentTime=this.currentDate.rules[e],this.$forceUpdate()},openActivity:function(){e.navigateTo({url:"../activity/index"})},openPark:function(){e.navigateTo({url:"/pages/park/index"})},openInfo:function(){this.showInfo=!0},closeInfo:function(){this.showInfo=!1},openBook:function(){var e=this.$moment().format("yyyy-MM-DD");this.showBook=!0,this.load3Day(e)},closeBook:function(){this.showBook=!1},tobook:function(t){e.navigateTo({url:"/pages/visit/book?from="+t+"¤tDate="+JSON.stringify(this.currentDate)+"¤tTime="+JSON.stringify(this.currentTime)})},loadInfo:function(){this.util.request({api:"/api/mobile/visit/introduce",utilSuccess:function(e){console.log(e)},utilFail:function(e){}})},load3Day:function(e){var t=this;t.listDatePrice=[];var o=this.$moment(e).add("days",2).format("yyyy-MM-DD"),r=this.$moment(e).add("days",1).format("yyyy-MM-DD"),a=this.$moment().format("yyyy-MM-DD"),i=this.$moment().add("days",1).format("yyyy-MM-DD"),c=this.$moment().add("days",2).format("yyyy-MM-DD"),u=a==e?r:e;this.loadCalendar(e,o,(function(e){t.listDatePrice=e;var o,r=0,s=n(t.listDatePrice);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.checked=!1,l.datef=t.$moment(l.date).format("MM月DD日");var d=t.$moment(l.date).format("dddd");if(l.date==a?l.week="今天":l.date==i?l.week="明天":l.date==c?l.week="后天":l.week=d,l.date==u){l.checked=!0,t.currentDate=l,t.currentIndex=r;var f,m=0,h=n(l.rules);try{for(h.s();!(f=h.n()).done;){var y=f.value;y.checked=!1,y.checked=0==m,y.checked&&(t.currentTime=y),m++}}catch(v){h.e(v)}finally{h.f()}}r++}}catch(v){s.e(v)}finally{s.f()}}))},loadCalendar:function(e,t,n){this.util.request({api:"/api/mobile/visit/get-calendar",data:{start_date:e,end_date:t},utilSuccess:function(e){n(e)},utilFail:function(e){}})}}};t.default=a}).call(this,n(1)["default"])},284:function(e,t,n){"use strict";n.r(t);var o=n(285),r=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=r.a},285:function(e,t,n){}},[[278,"common/runtime","common/vendor"]]]);
|