Files
PropertyDeployment/resources/Web/WechatOwnerService/html/static/js/pages-appointment-appointment.6fef6940.js
2025-12-09 22:41:31 +08:00

1 line
31 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-appointment-appointment"],{"1db3":function(e,t,n){"use strict";var i=n("9943"),a=n.n(i);a.a},"2c13":function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("2634")),o=i(n("9b1b")),r=i(n("2fdc"));n("64aa"),n("fd3c"),n("aa77"),n("bf0f"),n("473f"),n("e838"),n("c223"),n("4626"),n("5ac7"),n("aa9c"),n("2797"),n("8f71"),n("bd06"),n("dd2b"),n("d4b5");var c=n("b4bd"),s=n("374b"),u=n("f700"),l=i(n("fb05")),d={name:"appointment",props:{},data:function(){return{selectHeader:0,selectChangGuan:0,WeekList:(0,c.getWeekTime)(new Date,3,!1),triggered:!1,picker:[],totalMoney:0,selectDate:"",communityId:"",page:1,row:100,CGList:[],curChangGuanVenueId:0,CDList:[],CurList:[],TimeList:[],priceRules:[]}},filters:{formatTime:function(e){var t=new Date(e),n=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",i=t.getDate()<10?"0"+t.getDate():t.getDate();return n+i}},methods:{PickerChange:function(e){this.PickerChoose(e.detail.value),this._loadChangdiList()},PickerChoose:function(e){this.selectChangGuan=e,this.selectIndex=e,this.curChangGuanVenueId=this.CGList[e]["venueId"],this.CurList=[],this.CDList=[],this.totalMoney=0,this.initTimeLine()},initTimeLine:function(){this.TimeList=[];var e=this.CGList[this.selectChangGuan]["startTime"],t=this.CGList[this.selectChangGuan]["endTime"];""!=e&&""!=t&&(this.TimeList=(0,s.getBetweenTime)(e,t))},ChangDiStatus:function(e){return"N"==e.isOpen?"FeiShou":"C"==e.isOpen?"yiXuan":"S"==e.isOpen?"yiShou":"H"==e.isOpen?"keYueBan":void 0},tabSelect:function(e){this.TabCur=e.currentTarget.dataset.id,this.scrollLeft=60*(e.currentTarget.dataset.id-1)},SelectHeader:function(e,t){this.ChooseHeader(e.code,t)},ChooseHeader:function(e,t){this.selectHeader=t,this.selectDate=e,this._loadChangdiList()},HoursStr:function(e){var t=e+":00-"+(Number(e)+1)+":00";return t},_loadChangdiList:function(){var e=this;return(0,r.default)((0,a.default)().mark((function t(){var n,i,r,c,u,l;return(0,a.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e,n.CurList=[],n.CDList=[],n.totalMoney=0,uni.showLoading({title:e.$t("components.mgb appointment.mgb appointment.加载中"),mask:!0}),i={page:e.page,row:e.row,communityId:e.communityId,appointmentTime:e.selectDate,venueId:e.curChangGuanVenueId},t.prev=6,t.next=9,(0,s.getChangdi)(i);case 9:r=t.sent,console.log("getChangdi API返回结果:",r),c=r.data||r.records||r,c&&c.length>0?(u=c.map((function(t){var n=e._getCurrentPriceFromRules(t,e.selectDate);return(0,o.default)((0,o.default)({},t),{},{currentPrice:n.currentPrice,priceType:n.priceType,fullPrice:n.fullPrice,halfPrice:n.halfPrice,bookingType:t.bookingType||"both"})})),l=n._filtersChangdiTime(u),n.CDList=l,n._loadPriceRules(u).then((function(){n.CDList=n.CDList.map((function(e){var t=n._getCurrentPriceFromRules(e,n.selectDate);return(0,o.default)((0,o.default)({},e),{},{currentPrice:t.currentPrice,priceType:t.priceType,fullPrice:t.fullPrice,halfPrice:t.halfPrice})})),n.selectChangdiList&&n.selectChangdiList.length>0&&(n.selectChangdiList=n.selectChangdiList.map((function(e){var t=n.CDList.find((function(t){return(t.spaceId||t.id)===(e.spaceId||e.id)}));return t?(0,o.default)((0,o.default)({},e),{},{currentPrice:t.currentPrice}):e})),n.totalMoney=n.selectChangdiList.reduce((function(e,t){return e+parseFloat(t.currentPrice||0)}),0))})),n._loadIsBookList()):(console.log("没有获取到场地数据"),n.CDList=[]),t.next=19;break;case 15:t.prev=15,t.t0=t["catch"](6),console.error("获取场地数据失败:",t.t0),n.CDList=[];case 19:return t.prev=19,uni.hideLoading(),t.finish(19);case 22:case"end":return t.stop()}}),t,null,[[6,15,19,22]])})))()},_loadPriceRules:function(e){var t=this;return(0,r.default)((0,a.default)().mark((function n(){var i,o;return(0,a.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(n.prev=0,e&&0!==e.length){n.next=3;break}return n.abrupt("return");case 3:if(console.log("处理后的场地数据:",e),i=e.map((function(e){return e.spaceId||e.id||e.space_id})),console.log("提取的场地ID:",i),0!==i.length){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,(0,s.getCommunitySpacePriceRules)({spaceIds:i.join(",")});case 10:o=n.sent,console.log("价格规则API返回结果:",o),200===o.code&&(t.priceRules=o.data||o.records||o,console.log("设置的价格规则数据:",t.priceRules)),n.next=18;break;case 15:n.prev=15,n.t0=n["catch"](0),console.error("获取价格规则失败:",n.t0);case 18:case"end":return n.stop()}}),n,null,[[0,15]])})))()},_getCurrentPriceFromRules:function(e,t){if(!t)return{currentPrice:"0.00",priceType:"default",fullPrice:"0.00",halfPrice:"0.00"};var n=new Date(t).getDay(),i=["SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY"][n],a=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][n];if(console.log("计算价格: 日期=".concat(t,", 星期=").concat(n,", 星期名称=").concat(i,", 中文星期=").concat(a,", bookingType=").concat(e.bookingType)),console.log("场地价格规则:",e.priceRules),e.priceRules&&e.priceRules.length>0){var o,r,c,s,u=e.priceRules.find((function(e){var t=e.ruleName||"";return(t.includes(i)||t.includes(a))&&("1001"===e.ruleType||t.includes("全场"))})),l=e.priceRules.find((function(e){var t=e.ruleName||"";return(t.includes(i)||t.includes(a))&&("2002"===e.ruleType||t.includes("半场"))})),d=e.priceRules.find((function(e){var t=e.ruleName||"";return t.includes("统一全场")||"1001"===e.ruleType&&!t.includes("星期")&&!t.includes(i)})),f=e.priceRules.find((function(e){var t=e.ruleName||"";return t.includes("统一半场")||"2002"===e.ruleType&&!t.includes("星期")&&!t.includes(i)}));if(console.log("匹配到的规则:",{dayFullRule:u,dayHalfRule:l,uniformFullRule:d,uniformHalfRule:f}),u)o=u.price||"0.00",r=l?l.price||"0.00":(o/2).toFixed(2),c="daily";else if(d)o=d.price||"0.00",r=f?f.price||"0.00":(o/2).toFixed(2),c="uniform";else{var p=0===n||6===n;o=p?e.fullPriceWeekend||"0.00":e.fullPriceWeekday||"0.00",r=p?e.halfPriceWeekend||"0.00":e.halfPriceWeekday||"0.00",c="default"}return s=("Full"===e.bookingType||e.bookingType,o),console.log("最终价格: fullPrice=".concat(o,", halfPrice=").concat(r,", bookingType=").concat(e.bookingType,", currentPrice=").concat(s)),{currentPrice:s,priceType:c,fullPrice:o,halfPrice:r}}var g,h=0===n||6===n,v=h?e.fullPriceWeekend||"0.00":e.fullPriceWeekday||"0.00",m=h?e.halfPriceWeekend||"0.00":e.halfPriceWeekday||"0.00";return g="Full"===e.bookingType?v:"Half"===e.bookingType?m:v,{currentPrice:g,priceType:"default",fullPrice:v,halfPrice:m}},_loadIsBookList:function(){var e=this;this.page,this.row,this.communityId,this.selectDate,this.curChangGuanVenueId;(0,u.getBooks)(1).then((function(t){if(wx.hideLoading(),"-1"!=t){for(var n=t.data,i=[],a=0;a<n.length;a++)for(var o=n[a].times,r=0;r<o.length;r++){var c={appointmentTime:n[a].appointmentTime,spaceId:n[a].spaceId,spaceName:n[a].spaceName,timeId:o[r].timeId,hours:o[r].hours,personName:n[a].personName,personTel:n[a].personTel,communityId:n[a].communityId,state:o[r].state};i.push(c)}for(var s=function(){var t=e.CDList[u];t.openTimes.forEach((function(n){if("Y"==n.isOpen){var a=n.hours;a<10&&(a="0"+a);var o=e.selectDate+" "+a+":00:00",r=new Date,c=new Date(o);if(n["nd"]=r.getTime(),n["itd"]=c.getTime(),n["mathc"]=r.getTime()-c.getTime(),r.getTime()>c.getTime())n.isOpen="N";else{var s=0,u=[];if(i.forEach((function(i){if(i.spaceId==n.spaceId&&i.hours==n.hours&&i.appointmentTime==e.selectDate&&"Y"!=i.state){s++;var a=i.bookingType||t.bookingType||"Full";u.push(a)}})),"Full"===t.bookingType)s>0&&(n.isOpen="S");else if("Half"===t.bookingType)s>=2?n.isOpen="S":1===s&&(n.isOpen="H");else{var l=u.includes("Full"),d=u.filter((function(e){return"Half"===e})).length;l||d>=2?n.isOpen="S":1===d&&(n.isOpen="H")}}}}))},u=0;u<e.CDList.length;u++)s()}}))},_filtersChangdiTime:function(e){for(var t=0;t<e.length;t++){for(var n=e[t].openTimes,i=[],a=0;a<n.length;a++){for(var o=n[a].hours<10?"0"+n[a].hours:n[a].hours,r=o+":00",c="false",s=0;s<this.TimeList.length-1;s++)if(r==this.TimeList[s]){c="true";break}"true"==c&&i.push(n[a])}e[t].openTimes=i}return e},_loadChangGuan:function(){var e=this,t={page:e.page,row:e.row,communityId:e.communityId};(0,s.getChangGuan)(t).then((function(t){var n=t.data;e.CGList=n;for(var i=[],a=0;a<e.CGList.length;a++)i.push(e.CGList[a]["name"]);e.picker=i,e.PickerChoose(e.selectChangGuan),e.ChooseHeader(e.selectDate.code,e.selectHeader)}))},getDayFee:function(e,t){var n=t||this.selectDate;if(console.log("getDayFee调用参数:",{item:e,date:n,priceRules:this.priceRules}),!n)return{fullPrice:0,halfPrice:0};var i=new Date(n).getDay();if(this.priceRules&&this.priceRules.length>0){var a=this.priceRules.filter((function(t){var n=e.spaceId||e.id||e.space_id,i=t.spaceId||t.space_id;return i===n}));if(console.log("匹配到的场地价格规则:",a),a.length>0){var o=["周日","周一","周二","周三","周四","周五","周六"][i],r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][i],c=a.find((function(e){var t="1001"===e.ruleType||"DAY_PRICING_FULL"===e.ruleType||e.rule_name&&(e.rule_name.includes(o)||e.rule_name.includes(r))&&("1001"===e.ruleType||!e.ruleType);if(e.day){return t&&{Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6,Sunday:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6,SUNDAY:0}[e.day]===i}return t}));if(c)return console.log("找到按天全场收费规则:",c),{fullPrice:c.price||0,halfPrice:c.price?c.price/2:0};var s=a.find((function(e){var t="2002"===e.ruleType||"DAY_PRICING_HALF"===e.ruleType||e.rule_name&&(e.rule_name.includes(o)||e.rule_name.includes(r))&&"2002"===e.ruleType;if(e.day){return t&&{Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6,Sunday:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6,SUNDAY:0}[e.day]===i}return t}));if(s)return console.log("找到按天半场收费规则:",s),{fullPrice:s.price?2*s.price:0,halfPrice:s.price||0};var u=a.find((function(e){return"1001"===e.ruleType||"UNIFORM_PRICING_FULL"===e.ruleType}));if(u)return console.log("找到统一全场收费规则:",u),{fullPrice:u.price||0,halfPrice:u.price?u.price/2:0};var l=a.find((function(e){return"2002"===e.ruleType||"UNIFORM_PRICING_HALF"===e.ruleType}));if(l)return console.log("找到统一半场收费规则:",l),{fullPrice:l.price?2*l.price:0,halfPrice:l.price||0};var d=a.find((function(e){return e.rule_name&&(e.rule_name.includes(o)||e.rule_name.includes(r))}));if(d)return console.log("通过rule_name匹配到收费规则:",d),{fullPrice:d.price||0,halfPrice:d.price?d.price/2:0}}}return{fullPrice:0,halfPrice:0}},SelectCd:function(e,t,n){var i=this.CDList[t];console.log("=== 选择场地详细日志 ==="),console.log("场地信息:",{name:i.name,bookingType:i.bookingType,currentPrice:i.currentPrice,fullPrice:i.fullPrice,halfPrice:i.halfPrice});var a=this._formatPriceToNumber(i.currentPrice);console.log("使用页面显示价格:",a);var o="1001",r="Full";if("Half"===i.bookingType?(o="2002",r="Half"):"Full"===i.bookingType?(o="1001",r="Full"):"Both"===i.bookingType&&(o="1001",r="Both"),console.log("确定的ruleType:",o),console.log("确定的bookingType:",r),console.log("计算出的费用:",a),console.log("当前总价:",this.totalMoney),e["changdiIndex"]=t,e["spaceId"]=i.spaceId,e["changdiName"]=i.name,e["cdMoney"]=a,e["ruleType"]=o,e["bookingType"]=r,"C"===e.isOpen){this.CDList[t].openTimes[n].isOpen=e.originalState||"Y";var c=this.CurList.findIndex((function(t){return t==e}));if(c>-1){var s=parseFloat(this.totalMoney)||0,u=(s-a).toFixed(2);this.totalMoney=u,this.CurList.splice(c,1),console.log("取消选择,新总价:",this.totalMoney)}}else if("Y"===e.isOpen||"H"===e.isOpen){e.originalState=e.isOpen,this.CDList[t].openTimes[n].isOpen="C",this.CurList.push(e);var l=parseFloat(this.totalMoney)||0,d=(l+a).toFixed(2);this.totalMoney=d,console.log("选择场地,新总价:",this.totalMoney)}console.log("========================")},_formatPriceToNumber:function(e){if("number"===typeof e)return e;if("string"===typeof e){var t=parseFloat(e);return isNaN(t)?0:t}return 0},confCd:function(){var e=this.CurList.map((function(e){return e.bookingType})),t=e.some((function(e){return"Full"===e||"full"===e})),n=e.some((function(e){return"Half"===e||"half"===e})),i=e.some((function(e){return"Both"===e||"both"===e})),a="both";!t||i||n?!n||i||t?(i||t&&n)&&(a="both"):a="half":a="full",console.log("=== 场地类型控制策略分析 ==="),console.log("已选场地类型:",e),console.log("hasFullOnly:",t,"hasHalfOnly:",n,"hasBoth:",i),console.log("确定的courtTypeControl:",a),console.log("==========================");var o={bookDate:this.selectDate,cgName:this.picker[this.selectChangGuan],cgIndex:this.selectChangGuan,bookList:JSON.stringify(this.CurList),totalMoney:this.totalMoney,courtTypeControl:a,bookingTypes:JSON.stringify(e)};this.CurList.length<=0?uni.showToast({title:this.$t("components.mgb appointment.mgb appointment.还没有选择场地哦"),duration:2e3}):(uni.setStorageSync(l.default.CART_TYPE.BOOKING,JSON.stringify(o)),uni.navigateTo({url:"/pages/appointment/appointmentPay?fee="+JSON.stringify(o)+"&courtTypeControl="+a}),this.$emit("confCd",o))},onPulling:function(e){this.$emit("onPulling",e)},onRefresh:function(){var e=this;this._freshing||(this._freshing=!0,setTimeout((function(){e.triggered=!1,e._freshing=!1}),1e3))},onRestore:function(){this.triggered="restore",console.log("onRestore")}},mounted:function(){var e=this;this._freshing=!1,setTimeout((function(){e.triggered=!0}),1e3);var t=this;this.vc.getCurCommunity().then((function(e){t.communityId=e.communityId,t._loadChangGuan(),t.selectDate=t.WeekList[0]}))}};t.default=d},"326d":function(e,t,n){"use strict";n.r(t);var i=n("ffe2"),a=n("433d");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("1db3");var r=n("828b"),c=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"525e34dc",null,!1,i["a"],void 0);t["default"]=c.exports},"374b":function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.getBetweenTime=function(e,t){var n=+e.split(":")[0],i=+t.split(":")[0],a=[];while(n<=i){var o=n>=10?"".concat(n,":00"):"0".concat(n,":00");a.push(o),n+=1}return a},t.getBookingList=function(e){return new Promise((function(t,n){(0,a.requestNoAuth)({url:o.default.querySpacePerson,method:"GET",data:e,success:function(e){if(200!=e.statusCode)n();else{var i=e.data;t(i)}},fail:function(e){n(e)}})}))},t.getChangGuan=function(e){return new Promise((function(t,n){(0,a.requestNoAuth)({url:o.default.queryChangGuan,method:"GET",data:e,success:function(e){if(200!=e.statusCode);else{var n=e.data;t(n)}},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t.getChangdi=function(e){return new Promise((function(t,n){(0,a.requestNoAuth)({url:o.default.queryChangDi,method:"GET",data:e,success:function(e){if(200!=e.statusCode)n();else{var i=e.data;t(i)}},fail:function(e){n(e)}})}))},t.getCommunitySpacePriceRule=function(e){return new Promise((function(t,n){(0,a.requestNoAuth)({url:o.default.queryCommunitySpacePriceRule,method:"GET",data:e,success:function(e){if(200!=e.statusCode);else{var n=e.data;t(n)}},fail:function(e){wx.showToast({title:"查询价格规则失败",icon:"none",duration:2e3})}})}))},t.getCommunitySpacePriceRules=function(e){return new Promise((function(t,n){(0,a.requestNoAuth)({url:o.default.queryCommunitySpacePriceRules,method:"GET",data:e,success:function(e){if(200!=e.statusCode);else{var n=e.data;t(n)}},fail:function(e){wx.showToast({title:"批量查询价格规则失败",icon:"none",duration:2e3})}})}))},n("aa9c"),n("bf0f");var a=n("a7bc"),o=i(n("79d4"));i(n("d5d0")),i(n("bce4"))},"433d":function(e,t,n){"use strict";n.r(t);var i=n("2c13"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=a.a},"4eca":function(e,t,n){var i=n("c86c");t=i(!1),t.push([e.i,".bottom-cyan[data-v-525e34dc]{color:#1cbbb4}.bottom-cyan-line[data-v-525e34dc]{border-bottom:solid 3px #1cbbb4}\n.flex-imd[data-v-525e34dc]{margin-left:-40px}\n.navbar-list[data-v-525e34dc]{margin:5px auto;width:100%;height:50px;position:relative;overflow-x:scroll;overflow-y:hidden}.navbar-list>ul[data-v-525e34dc]{\r\n\t/* padding: 0 20px; */position:absolute;height:50px;left:0;display:flex;flex-flow:row nowrap}.navbar-item[data-v-525e34dc]{\r\n\t/* width: 120px; */border:#1cbbb4 2px solid;width:-webkit-max-content;width:max-content;margin-left:10px;box-sizing:border-box;height:50px;display:flex;flex-flow:column nowrap;justify-content:space-around;align-items:center;cursor:pointer\r\n\t/* margin-right: 10px; */}.navbar-list[data-v-525e34dc]::-webkit-scrollbar{display:none}.navbar-item.act[data-v-525e34dc]{background-image:-webkit-linear-gradient(left,#ff512f,#dd2476);-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-weight:700}\r\n\r\n/* 不可约\r\n */.FeiShou[data-v-525e34dc]{background-color:#f0f0f0;color:#cbcbcb}\r\n\r\n/* 可约\r\n */.KeShou[data-v-525e34dc]{background-color:#fff;color:#000}\r\n\r\n/* 已选\r\n */.yiXuan[data-v-525e34dc]{background-color:#1cbbb4;color:#fff}\r\n\r\n/* 别人已选\r\n */.yiShou[data-v-525e34dc]{background-color:#8799a3;color:#fff}\r\n\r\n/* 可约另一半场\r\n */.keYueBan[data-v-525e34dc]{background-color:#ffecd9;color:#ff9500}.Fang[data-v-525e34dc]{width:70px;height:40px;text-align:center;padding-top:10px;border-right:#d7d3d3 .5px solid;border-bottom:#d7d3d3 .5px solid}.NeiRong[data-v-525e34dc]{float:left}.HuaDongBiao[data-v-525e34dc]{overflow:hidden;display:inline-block}.LouCeng[data-v-525e34dc]{font-size:%?18?%}.Ceng[data-v-525e34dc]{overflow:auto;position:-webkit-sticky;position:sticky;left:0;width:15vw;line-height:%?60?%;text-align:center;float:left;background-color:#f0f0f0;z-index:0;border:#dedede 1px solid;height:860px}.BiaoTou[data-v-525e34dc]{border:solid 1px #f0f0f0;line-height:37px;height:40px}.BiaoGe[data-v-525e34dc]{padding-bottom:auto;width:100%;overflow:scroll;overflow-y:auto;overflow-x:auto;white-space:nowrap;font-size:%?20?%}.barConten[data-v-525e34dc]{padding:0 6px;height:34px;line-height:34px;background:#fff;border-bottom:1px solid #f0f0f0}.barHeight[data-v-525e34dc]{height:5px;background-color:#f0f0f0}.seniorblack[data-v-525e34dc]{background-color:red}.day[data-v-525e34dc]{width:18px;font-size:10px;height:18px;line-height:18px;margin:0 auto;border-radius:57%;margin-top:4px}.scroll-view_H[data-v-525e34dc]{white-space:nowrap;width:100%;background:#fff;padding-top:10px;padding-bottom:10px}.scroll-view-item[data-v-525e34dc]{height:%?300?%;line-height:%?300?%;text-align:center;font-size:%?36?%}.scroll-view-item_H[data-v-525e34dc]{display:inline-block;text-align:center;width:%?138?%;margin-right:5px;height:%?100?%;background:#fff}",""]),e.exports=t},"66de":function(e,t,n){"use strict";n.r(t);var i=n("f8a1"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=a.a},9943:function(e,t,n){var i=n("4eca");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("967d").default;a("1fdfc021",i,!0,{sourceMap:!1,shadowMode:!1})},b4bd:function(e,t,n){"use strict";var i=n("f5bd").default;n("c223");var a=i(n("c0ef"));a.default;console.log("i18n");var o=function(e){var t=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();n>=1&&n<=9&&(n="0"+n),i>=0&&i<=9&&(i="0"+i);var o=t+"-"+n+"-"+i,r=t+"年",c=n+"月",s=i+"日",u=[a.default.messages[a.default.locale]["week.周日"],a.default.messages[a.default.locale]["week.周一"],a.default.messages[a.default.locale]["week.周二"],a.default.messages[a.default.locale]["week.周三"],a.default.messages[a.default.locale]["week.周四"],a.default.messages[a.default.locale]["week.周五"],a.default.messages[a.default.locale]["week.周六"]][e.getDay()];return{time:r+c+s,name:u,code:o,day:i}};e.exports={getWeekTime:function(e,t,n){return function(e,t,n){for(var i=new Date(e),a=(i.getDay(),new Date(e)),r=[],c=0;c<7;c++){var s=new Date(a.getTime()+864e5*c),u=s.getFullYear(),l=s.getMonth()+1<10?"0"+(s.getMonth()+1):s.getMonth()+1,d=s.getDate()<10?"0"+s.getDate():s.getDate();r[c]=o(new Date("".concat(u,"-").concat(l,"-").concat(d)))}return r}(e)}}},c0ef:function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("fd3c"),n("dc8a"),n("4626"),n("5ac7"),n("22b6");var a=i(n("94da")),o={English:"en","中文":"zh-Hans","ខ្មែរ":"Khmer"},r=uni.getStorageSync("language")||"en";function c(e){return Object.keys(o).map((function(t){var n=o[t],i=!!a.default[n];return{name:t,code:n,selected:n===e,available:i}}))}var s=c(r);var u={locale:r,messages:a.default,languageOptions:s,languageMap:o,updateLanguage:function(e){return function(e){if(e&&Object.values(o).includes(e))return uni.setStorageSync("language",e),r=e,s=c(e),{locale:r,messages:a.default,languageOptions:s,languageMap:o};console.warn("不支持的语言代码: ".concat(e))}(e)},refreshLanguageOptions:function(){return s=c(r),s}};t.default=u},dd85:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",[n("appointment",{on:{onPulling:function(t){arguments[0]=t=e.$handleEvent(t),e.onPulling.apply(void 0,arguments)},SelectHeader:function(t){arguments[0]=t=e.$handleEvent(t),e.SelectHeader.apply(void 0,arguments)},Appointment:function(t){arguments[0]=t=e.$handleEvent(t),e.Appointment.apply(void 0,arguments)}}})],1)},a=[]},eec2:function(e,t,n){"use strict";n.r(t);var i=n("dd85"),a=n("66de");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);var r=n("828b"),c=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"ff49f9ae",null,!1,i["a"],void 0);t["default"]=c.exports},f700:function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.appointmentRoom=function(e){return new Promise((function(t,n){var i="";""==e.tenantName?i="名称不能为空":""==e.tenantSex?i="性别不能空":""==e.tenantTel?i="手机号不能为空":""==e.appointmentTime?i="请填写预约时间":""==e.appointmentRoomId&&(i="预约房屋为空"),""!=i?n(i):(0,a.request)({url:o.default.saveRentingAppointment,method:"POST",data:e,success:function(e){var i=e.data;0!=i.code?n(i.msg):t(i)},fail:function(e){n("服务异常")}})}))},t.getBooks=function(e){return new Promise((function(t,n){var i={page:"1",row:"1000",communityId:(0,c.getCommunityId)()};0==e&&(i["personTel"]=(0,r.getUserTel)(),i["personName"]=(0,r.getUserName)()),(0,a.request)({url:o.default.querySpacePerson,method:"GET",data:i,success:function(e){200!=e.statusCode?n("查询订场信息失败"):t(e.data)},fail:function(e){n(e)}})}))},t.getRentingPool=function(e){return new Promise((function(t,n){(0,a.request)({url:o.default.queryRentingPool,method:"GET",data:e,success:function(e){var i=e.data;0==i.code?t(i.data):n(i.msg)},fail:function(e){n(e)}})}))},t.hireRoom=function(e){return new Promise((function(t,n){var i="";""==e.rentingName?i="出租标题不能为空":""==e.roomId?i="请选择房屋":""==e.communityId?i="未找到小区信息":""==e.price?i="请填写租金(元)":""==e.paymentType?i="请选择付费类型":""==e.rentingConfigId?i="请选择出租方式":""==e.rentingDesc?i="请填写出租说明":e.photos.length<1?i="请选择图片":""==e.checkIn&&(i="请选择入住日期"),""!=i?n(i):(0,a.request)({url:o.default.saveRentingPool,method:"POST",data:e,success:function(e){var i=e.data;0!=i.code?n(i.msg):t(i)},fail:function(e){n("服务异常")}})}))},t.queryRentingConfig=function(){return new Promise((function(e,t){(0,a.request)({url:o.default.queryRentingConfig,method:"GET",data:{page:1,row:10},success:function(n){var i=n.data;0==i.code?e(i.data):t(i.msg)},fail:function(e){t(e)}})}))},n("bf0f");var a=n("a7bc"),o=i(n("79d4")),r=(i(n("bce4")),n("b9a1")),c=n("1c9a")},f8a1:function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("d5d0")),o=i(n("326d")),r=n("1803"),c=(a.default.constant,{components:{appointment:o.default},data:function(){return{selectHeader:0,WeekList:[],day:1}},onLoad:function(e){a.default.onLoad(e),(0,r.getCurOwner)().then((function(e){}))},methods:{SelectHeader:function(e){console.log(e)},onPulling:function(){console.log("onPulling")},confCd:function(e){}}});t.default=c},fb05:function(e,t,n){"use strict";n("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SHOP_TYPE:{MARKET:"34004",RESTAURANT:"34005",FOOD_SHOP:"34006",PHARMACY:"34007",MOM_CHILD:"34008",HOMEMAKING:"34009"},CATEGORY_TYPE:{HOMEMAKING:"1",INDEX:"2"},MENU_TYPE:{HOMEMAKING:"1001",SHOP:"2002",SHOP_INDEX:"3003"},SHOP_ID_GLOBAL:"9999",CART_TYPE:{HOMEMAKING:"3307",SHOP:"3306",BOOKING:"3308"},headImg:"/h5/images/missing-face.png",errorImage:"/h5/images/errorImage.jpg"}},ffe2:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"content"},[n("v-uni-view",[n("v-uni-form",[n("v-uni-view",{staticClass:"cu-form-group"},[n("v-uni-view",{staticClass:"title"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.选择场馆")))]),n("v-uni-picker",{attrs:{value:e.selectChangGuan,range:e.picker},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.PickerChange.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"picker"},[e._v(" "+e._s(e.selectChangGuan>-1?e.picker[e.selectChangGuan]:e.$t("components.mgb appointment.mgb appointment.立德羽毛球馆"))+" ")])],1)],1)],1),n("v-uni-view",{staticStyle:{position:"sticky",top:"0ch","z-index":"999"}},[n("v-uni-scroll-view",{staticClass:"bg-white nav",attrs:{"scroll-with-animation":!0,"scroll-x":!0}},e._l(e.WeekList,(function(t,i){return n("v-uni-view",{key:i,staticClass:"scroll-view-item_H",class:e.selectHeader==i?"bg-cyan text-shadow":"bg-blue",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.SelectHeader(t,i)}}},[n("v-uni-view",{staticStyle:{"text-align":"center","padding-left":"30px"}},[n("v-uni-view",{class:e.selectHeader==i?"bottom-cyan":"text-black"},[e._v(e._s(t.name))]),n("v-uni-view",{class:e.selectHeader==i?"bottom-cyan bottom-cyan-line":"text-black"},[e._v(" "+e._s(e._f("formatTime")(t.code))+" ")])],1)],1)})),1),n("v-uni-view",{staticClass:"barHeight"}),n("v-uni-view",{staticClass:"barConten"},[n("v-uni-view",{staticClass:"flex justify-between"},[n("v-uni-view",{staticClass:"radius text-df"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.选择预约时间段")))]),n("v-uni-view",{staticClass:"radius text-sm"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.共"))+e._s(e.CDList.length)+" "+e._s(e.$t("components.mgb appointment.mgb appointment.场地")))])],1)],1)],1),n("v-uni-scroll-view",{attrs:{"scroll-with-animation":!0,"scroll-y":!0}},[n("v-uni-view",{staticClass:"BiaoGe"},[n("v-uni-view",{staticClass:"Ceng"},[n("v-uni-view",{staticStyle:{height:"20px"}}),e._l(e.TimeList,(function(t,i){return n("v-uni-view",{key:i,staticClass:"BiaoTou"},[n("v-uni-view",{staticClass:"LouCeng bg-gray"},[e._v(e._s(t))])],1)}))],2),n("ul",{staticStyle:{display:"block","white-space":"nowrap"}},[e.CDList.length<=0?n("li",{staticStyle:{display:"inline-block","margin-left":"20px","margin-top":"20px","font-size":"14px"}},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.暂无订场信息")))]):e._e(),e._l(e.CDList,(function(t,i){return n("li",{key:i,staticStyle:{display:"inline-block"}},[n("v-uni-view",[n("v-uni-view",{staticClass:"Fang",staticStyle:{"border-top":"solid 0.5px #D7D3D3"}},[e._v(e._s(t.name))]),n("v-uni-view",{staticStyle:{"background-color":"#ffffff"}},e._l(t.openTimes,(function(a,o){return n("v-uni-view",{key:o,class:"Fang "+e.ChangDiStatus(a),on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.SelectCd(a,i,o)}}},[n("v-uni-view",{staticStyle:{display:"block"}},[e._v(e._s(t.currentPrice))])],1)})),1)],1)],1)}))],2)],1)],1),n("v-uni-view",{staticStyle:{position:"fixed",bottom:"0px",width:"100%",height:"auto"}},[n("v-uni-view",{staticStyle:{"border-top":"#dedede 1px solid","background-color":"white"}},[n("v-uni-view",{staticClass:"dashed-bottom p-3",staticStyle:{"padding-bottom":"5px","padding-left":"10px","padding-top":"5px"}},[n("v-uni-view",{staticClass:"cu-capsule radius"},[n("v-uni-view",{staticClass:"cu-tag bg-grey",staticStyle:{"background-color":"#dedede"}},[e._v("-")]),n("v-uni-view",{staticClass:"cu-tag line-grey"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.不可约")))])],1),n("v-uni-view",{staticClass:"cu-capsule radius"},[n("v-uni-view",{staticClass:"cu-tag bg-white",staticStyle:{border:"solid 1px #b8b8b8"}},[e._v("-")]),n("v-uni-view",{staticClass:"cu-tag line-grey"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.可约")))])],1),n("v-uni-view",{staticClass:"cu-capsule radius"},[n("v-uni-view",{staticClass:"cu-tag bg-blue",staticStyle:{"background-color":"#8799a3"}},[e._v("-")]),n("v-uni-view",{staticClass:"cu-tag line-grey"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.已约满")))])],1),n("v-uni-view",{staticClass:"cu-capsule radius"},[n("v-uni-view",{staticClass:"cu-tag",staticStyle:{"background-color":"#ffecd9",color:"#ff9500"}},[e._v("-")]),n("v-uni-view",{staticClass:"cu-tag line-grey"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.可约另一半场")))])],1),n("v-uni-view",{staticClass:"cu-capsule radius"},[n("v-uni-view",{staticClass:"cu-tag bg-cyan"},[e._v("-")]),n("v-uni-view",{staticClass:"cu-tag line-grey"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.已选择")))])],1)],1),e.CurList.length>0?n("div",{staticClass:"navbar-list"},[n("ul",{staticClass:"flex-imd"},e._l(e.CurList,(function(t,i){return n("li",{key:i,staticClass:"navbar-item"},[n("v-uni-view",{staticStyle:{"line-height":"15px"}},[n("v-uni-view",{staticStyle:{width:"84px","text-align":"center","padding-top":"3px","background-color":"#1cbbb4",height:"23px",color:"#ffffff","font-size":"10px"}},[e._v(" "+e._s(e.HoursStr(t.hours))+" ")]),n("v-uni-view",{staticStyle:{"padding-top":"3px","text-align":"center","background-color":"white",height:"23px","font-size":"14px"}},[e._v(" "+e._s(t.changdiName)+" ")])],1)],1)})),0)]):e._e(),n("v-uni-view",{staticClass:"cu-form-group"},[n("v-uni-view",{staticClass:"title"},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.总计:"))+" "),n("v-uni-text",{staticClass:"solid-bottom text-xxl text-price text-red"},[e._v(e._s(e.totalMoney))])],1),n("v-uni-button",{staticClass:"cu-btn round bg-blue",staticStyle:{"background-color":"#1cbbb4"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.confCd()}}},[e._v(" "+e._s(e.$t("components.mgb appointment.mgb appointment.提交订单")))])],1)],1)],1)],1)],1)},a=[]}}]);