1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-add"],{"0a26":function(e,t,i){var a=i("24fb");t=a(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.box[data-v-164319a6]{padding:%?20?%}.address-box[data-v-164319a6]{margin-bottom:%?20?%}.address-box-list[data-v-164319a6]{height:%?100?%;line-height:%?100?%;border-bottom:%?1?% solid #f2f2f2;padding:0 %?20?%;border-radius:%?8?%;background-color:#fff}.address-box-list[data-v-164319a6]:last-child{border:0}.address-box-label[data-v-164319a6]{display:inline-block;width:%?200?%;height:100%;float:left}.address-box-input[data-v-164319a6]{display:inline-block;width:%?460?%;height:100%;float:right;text-align:right}.address-box-input uni-input[data-v-164319a6]{height:%?80?%;line-height:%?80?%;margin-top:%?10?%;font-size:%?28?%;vertical-align:middle}.address-box-input-text[data-v-164319a6]{display:inline-block;width:%?430?%;line-height:100%;vertical-align:middle;color:#949494;padding-right:%?18?%;font-size:%?28?%}.address-box-input-icon[data-v-164319a6]{width:%?12?%;height:%?22?%;vertical-align:middle}.address-btn[data-v-164319a6]{width:%?700?%;height:%?70?%;line-height:%?70?%;color:#fff;background-color:#023894;border-radius:%?10?%;margin:%?50?% auto %?20?% auto;text-align:center}.address-btn2[data-v-164319a6]{width:%?700?%;height:%?70?%;line-height:%?70?%;color:#023894;background-color:#fff;border-radius:%?10?%;margin:%?20?% auto;text-align:center}.address-btn-del[data-v-164319a6]{width:%?700?%;height:%?70?%;line-height:%?70?%;color:#023894;background-color:#fff;border:%?1?% solid #023894;border-radius:%?10?%;margin:%?10?% auto;text-align:center}',""]),e.exports=t},"0bae":function(e,t,i){"use strict";i.r(t);var a=i("4310"),n=i("1137");for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);i("31aa");var r=i("f0c5"),d=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"164319a6",null,!1,a["a"],void 0);t["default"]=d.exports},1137:function(e,t,i){"use strict";i.r(t);var a=i("b3f2"),n=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(s);t["default"]=n.a},"31aa":function(e,t,i){"use strict";var a=i("9be3"),n=i.n(a);n.a},4310:function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){}));var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"box"},[0==e.defaultOrg||e.defaultOrg>0&&1==e.type?a("v-uni-view",{staticClass:"address-box"},[a("v-uni-view",{staticClass:"address-box-list"},[a("v-uni-view",{staticClass:"address-box-label"},[e._v("项目名称")]),a("v-uni-view",{staticClass:"address-box-input"},[e.orgs.length>0?a("v-uni-picker",{attrs:{disabled:"true",value:e.orgIndex,range:e.orgs,"range-key":"name"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindPickerChange.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"address-box-input-text"},[e._v(e._s(e.orgs[e.orgIndex].name))]),a("v-uni-image",{staticClass:"address-box-input-icon",attrs:{src:i("9c31")}})],1):e._e()],1)],1),a("v-uni-view",{staticClass:"address-box-list"},[a("v-uni-view",{staticClass:"address-box-label"},[e._v("项目服务")]),a("v-uni-view",{staticClass:"address-box-input"},[e.serves.length>0?a("v-uni-picker",{attrs:{value:e.serveIndex,range:e.serves,"range-key":"title"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindPickerServeChange.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"address-box-input-text"},[e._v(e._s(e.serves[e.serveIndex].title))]),a("v-uni-image",{staticClass:"address-box-input-icon",attrs:{src:i("9c31")}})],1):e._e()],1)],1),a("v-uni-view",{staticClass:"address-box-list"},[a("v-uni-view",{staticClass:"address-box-label"},[e._v("预约日期")]),a("v-uni-view",{staticClass:"address-box-input"},[a("v-uni-picker",{attrs:{mode:"date",value:e.date,start:e.startDate,end:e.endDate},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindDateChange.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"address-box-input-text"},[e._v(e._s(e.date))]),a("v-uni-image",{staticClass:"address-box-input-icon",attrs:{src:i("9c31")}})],1)],1)],1),a("v-uni-view",{staticClass:"address-box-list"},[a("v-uni-view",{staticClass:"address-box-label"},[e._v("预约时间段")]),a("v-uni-view",{staticClass:"address-box-input"},[e.times.length>0?a("v-uni-picker",{attrs:{value:e.timeIndex,range:e.times,"range-key":"name"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindPickerTimeChange.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"address-box-input-text"},[e._v(e._s(e.times[e.timeIndex].name))]),a("v-uni-image",{staticClass:"address-box-input-icon",attrs:{src:i("9c31")}})],1):e._e()],1)],1)],1):e._e(),a("v-uni-view",{staticClass:"address-box"},[a("v-uni-view",{staticClass:"address-box-list"},[a("v-uni-view",{staticClass:"address-box-label"},[e._v("预约人姓名")]),a("v-uni-view",{staticClass:"address-box-input"},[a("v-uni-input",{attrs:{placeholder:"请输入",type:"text"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1)],1),a("v-uni-view",{staticClass:"address-box-list"},[a("v-uni-view",{staticClass:"address-box-label"},[e._v("手机号码")]),a("v-uni-view",{staticClass:"address-box-input"},[a("v-uni-input",{attrs:{placeholder:"请输入",type:"tel"},model:{value:e.phone,callback:function(t){e.phone=t},expression:"phone"}})],1)],1)],1),a("v-uni-view",{staticClass:"address-btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.saveBtn.apply(void 0,arguments)}}},[e._v("提 交")]),a("v-uni-view",{staticClass:"address-btn2",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.saveBtn2.apply(void 0,arguments)}}},[e._v("我的记录")])],1)},n=[]},"9be3":function(e,t,i){var a=i("0a26");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var n=i("4f06").default;n("7f75e63b",a,!0,{sourceMap:!1,shadowMode:!1})},"9c31":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAsCAYAAAB/nHhDAAADpklEQVRYR62XXWgVRxTH/2cvqRCEgq3JQ4Ptg74UCn0p9CFqCq2IWKFIorQNbSyh9M7sNv0gKn7dWpSq2JKd2ZT7INVGCU2RtiCFVlDBD8Qni9BCaxFBH5pNBEFKcc2cMmGVmNyZe/cm87p7/r89e+b8zwxVq9WWLMsOAngPQImIvm1tbf2or6/vPyzAIqXUXiLaNUvr1MTExMZKpXJ/vgzSWt8C8EwNobG2trY3e3p6puYDsYAJAE85RI4KIbYQETcLoSRJRpj5bY9AIoQIm4VQHMdLS6XSRWZe4YEcklIONpMF2aA4jjuCIDgP4DmPyB4p5d6ikGmAXUmSLGfmc46CP3ztEynll0UgjwB5Js8HQWAhSx0iTEQfCCGqjUIeA+SZvJhn8qRDxAB4V0o50ghkDsAGDQ8Pv2yMOQ1gsUNkipk3hWF4sh6kJiDP5BVmPgWg1SFiu/wNKeXPPogTYIO01usA/ADgCYfIv0S0Xghx1gXxAmyQUmojEX1njdAhci8IgtfK5fLlWs/rAvJMegEcBRA4IHeJqEsIcXX284YAeU3eZ+avAbhiUmNMVxRFv8+ENAzIM/kYwGFPUW/nmVx/+E4hQA7ZDeAzD+SmMaYziiI7Bpzperd3kiSHmPlT584h+ivLspUDAwP/FM7AijKztXkFQHi+5FqWZauaAsyAfAPgHU8mx5sGWNGxsbFSmqajzNztbMR6XuJ7bgHj4+PfW8tYcEAufgzAW56PGGnqF9kia62rRNTvEf+tpaVldVMArfVXAAY84n8YY1ZHUZQWBmitPwew0yP+d24ZxRtNa70VwBce8VvMvCoMwxuFrUIpZc9GsUc8BdAppfyzsNkppfqI6IjHWu4wc1cYhtcK27VSahMRnfAMnLvGmDVRFF0pPHCUUhuIyDaSc2QaY9ZGUWQPbTWXcxfFcfxqEAR26C9yxN4noteFEL/6ur0mIEmSTmb+xXOiyAB0Syl/qmc1tQ5eLzGzPRO5Dl5TRNQrhBitJz5n4CilXiCiMwCedgQzM/eHYWh3VEPrUQZDQ0MrSqWSLVa7J/JDKaWvF+aETgO01s8CuACgwyO+Q0q5v6HPnvHS9AUkCIJLAJY7txrRPiGEz3+cXGu7tlibPeJDQgifc3qTsoBJAEtqdiHRkXK53N/s/Wx6F2mtbwJYNhvAzKPt7e29877GKqUGiejAYw5I9GOapt2VSuVB0aLOMbt8tm4HEFlDY+Zjk5OT2xbilm9h/wP5UF714REOIQAAAABJRU5ErkJggg=="},b3f2:function(e,t,i){"use strict";(function(e){i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("99af"),i("d3b7"),i("159b"),i("d401"),i("25f0"),i("14d9"),i("ac1f"),i("5319"),i("4d63"),i("c607"),i("2c3e");var a=getApp();function n(e){var t=new Date,i=t.getFullYear(),a=t.getMonth()+1,n=t.getDate();return"start"===e?i-=60:"end"===e&&(i+=2),a=a>9?a:"0"+a,n=n>9?n:"0"+n,"".concat(i,"-").concat(a,"-").concat(n)}var s={data:function(){return{id:0,defaultOrg:0,type:0,orgs:[],orgIndex:0,serves:[],serveIndex:0,date:n({format:!0}),startDate:n("start"),endDate:n("end"),times:[],timeIndex:0,name:"",phone:""}},onLoad:function(t){a.checkLogin(),this.defaultOrg=t.orgId?t.orgId:0,this.type=t.type?t.type:0,e.log(this.defaultOrg,this.type),this.defaultOrg?1==this.type?this.getOrgs():(uni.setNavigationBarTitle({title:"现场登记"}),uni.setStorageSync(a.globalData.storagePre+"orgId",this.defaultOrg)):this.getOrgs()},onShow:function(){var t=this;a.ajaxReadyCallback=function(i){var a=i.data.apiname;e.log(i),"org"==a?(t.orgs=i.data.data,t.defaultOrg&&1==t.type?t.orgs.length>0&&t.orgs.forEach((function(e,i){e.id.toString()==t.defaultOrg.toString()&&(t.orgIndex=i)})):t.orgIndex=0,t.orgs.length>0&&t.getService()):"service"==a?(t.serves=i.data.data,t.serveIndex=0,t.serves.length>0&&t.getServiceTime()):"serviceTime"==a?(t.times=[],t.timeIndex=0,i.data.data.forEach((function(e){t.times.push({id:e.id,name:e.start+"~"+e.end})}))):"order"==a&&(uni.showToast({title:"提交成功",icon:"none",duration:2e3}),setTimeout((function(){uni.navigateTo({url:"/pages/index/index"})}),1e3))}},methods:{getUrlCode:function(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.href)||[,""])[1].replace(/\+/g,"%20"))||null},bindPickerChange:function(t){e.log("picker发送选择改变,携带值为:"+t.detail.value),this.orgIndex=t.detail.value,this.getService()},bindPickerServeChange:function(t){e.log("bindPickerServeChange发送选择改变,携带值为:"+t.detail.value),this.serveIndex=t.detail.value,this.getServiceTime()},bindPickerTimeChange:function(t){e.log("bindPickerTimeChange发送选择改变,携带值为:"+t.detail.value),this.timeIndex=t.detail.value},bindDateChange:function(t){e.log("bindDateChange发送选择改变,携带值为:"+t.detail.value),this.date=t.detail.value,this.getServiceTime()},getOrgs:function(){this.serves=[],this.serveIndex=0,this.times=[],this.timeIndex=0,a.ajax({url:a.globalData.serverUrl+"org/lists",type:"POST",apiname:"org"})},getService:function(){this.times=[],this.timeIndex=0;var e=this.orgs[this.orgIndex].id;a.ajax({url:a.globalData.serverUrl+"service/list",type:"POST",apiname:"service",data:{orgId:e}})},getServiceTime:function(){var e=this.serves[this.serveIndex].id,t=this.orgs[this.orgIndex].id;a.ajax({url:a.globalData.serverUrl+"service/times",type:"POST",apiname:"serviceTime",data:{serviceId:e,day:this.date,orgId:t}})},saveBtn:function(){var e=0;this.times[this.timeIndex]&&(e=this.times[this.timeIndex].id);var t=0;this.orgs[this.orgIndex]&&(t=this.orgs[this.orgIndex].id);var i={type:0==this.defaultOrg?1:2,serviceTimeId:e,name:this.name,phone:this.phone,orgId:t};this.defaultOrg&&(i.orgId=this.defaultOrg),this.name?this.phone?a.ajax({url:a.globalData.serverUrl+"visitorOrder/order",type:"POST",apiname:"order",data:i}):uni.showToast({title:"请输入手机号",icon:"none",duration:2e3}):uni.showToast({title:"请输入姓名",icon:"none",duration:2e3})},saveBtn2:function(){uni.reLaunch({url:"/pages/index/index"})}}};t.default=s}).call(this,i("5a52")["default"])}}]);
|