(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7df78eaa"],{"8c59":function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{style:t.backgroundImg,attrs:{id:"mainPage"}},[t._m(0),i("div",{staticClass:"title"},[i("span",[t._v("入会测评预约")]),i("img",{attrs:{src:o("8b19"),width:"69px",height:"86px"}}),i("em",{staticClass:"button",on:{click:function(e){return t.onGoNewPage("testMemberNavi")}}},[t._v("主页")])]),i("div",{staticClass:"context"},[i("div",{staticClass:"bodyInfoArea",staticStyle:{"margin-top":"85px"}},[i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle"},[t._v("姓名")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"middleInput",attrs:{type:"text",placeholder:"请填写孩子姓名"},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}})]),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle"},[t._v("年龄")]),i("mu-select",{staticClass:"datePicker",staticStyle:{"margin-left":"7px"},model:{value:t.form.age,callback:function(e){t.$set(t.form,"age",e)},expression:"form.age"}},t._l(t.form.ageOptions,(function(t){return i("mu-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle"},[t._v("身高")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.height,expression:"form.height"}],staticClass:"middleInput",attrs:{type:"number",placeholder:"请输入身高",oninput:"if(value.length > 5)value = value.slice(0, 5)"},domProps:{value:t.form.height},on:{input:function(e){e.target.composing||t.$set(t.form,"height",e.target.value)}}}),i("em",[t._v("CM")])]),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle"},[t._v("体重")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.weight,expression:"form.weight"}],staticClass:"middleInput",attrs:{type:"number",placeholder:"请输入体重",oninput:"if(value.length > 5)value = value.slice(0, 5)"},domProps:{value:t.form.weight},on:{input:function(e){e.target.composing||t.$set(t.form,"weight",e.target.value)}}}),i("em",[t._v("KG")])]),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle"},[t._v("性别")]),i("div",{staticClass:"sexDiv"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.sex,expression:"form.sex"}],attrs:{type:"radio",id:"radio_man",checked:"",value:"1"},domProps:{checked:t._q(t.form.sex,"1")},on:{change:function(e){return t.$set(t.form,"sex","1")}}}),i("label",{staticStyle:{color:"#FFFFFF"},attrs:{for:"radio_man"}},[t._v("男")])]),i("div",{staticClass:"sexDiv"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.sex,expression:"form.sex"}],attrs:{type:"radio",id:"radio_woman",value:"2"},domProps:{checked:t._q(t.form.sex,"2")},on:{change:function(e){return t.$set(t.form,"sex","2")}}}),i("label",{staticStyle:{color:"#FFFFFF"},attrs:{for:"radio_woman"}},[t._v("女")])])])]),i("div",{staticClass:"bodyInfoArea"},[i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle4"},[t._v("训练场馆")]),i("mu-select",{staticClass:"datePicker",on:{change:t.getTimeItemOptions},model:{value:t.form.testShopId,callback:function(e){t.$set(t.form,"testShopId",e)},expression:"form.testShopId"}},t._l(t.form.shopOptions,(function(t){return i("mu-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle4"},[t._v("预约时间")]),i("mu-select",{staticClass:"datePicker",model:{value:t.form.testTimeId,callback:function(e){t.$set(t.form,"testTimeId",e)},expression:"form.testTimeId"}},t._l(t.form.timeOptions,(function(t){return i("mu-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle4"},[t._v("项目")]),i("mu-select",{staticClass:"datePicker",model:{value:t.form.testItemId,callback:function(e){t.$set(t.form,"testItemId",e)},expression:"form.testItemId"}},t._l(t.form.testOptions,(function(t){return i("mu-option",{key:t.value,staticStyle:{"!important color":"white"},attrs:{label:t.label,value:t.value}})})),1)],1),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle4"},[t._v("手机号码")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.phone,expression:"form.phone"}],staticClass:"middleInput",staticStyle:{"margin-left":"-20px"},attrs:{type:"number",oninput:"if(value.length > 11)value = value.slice(0, 11)",placeholder:"请输入手机号"},domProps:{value:t.form.phone},on:{input:function(e){e.target.composing||t.$set(t.form,"phone",e.target.value)}}})]),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle4"},[t._v("图形验证")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.picValidCode,expression:"form.picValidCode"}],staticClass:"middleInput",attrs:{type:"number",oninput:"if(value.length > 4)value = value.slice(0, 4)",placeholder:"请输入数字"},domProps:{value:t.form.picValidCode},on:{input:function(e){e.target.composing||t.$set(t.form,"picValidCode",e.target.value)}}}),i("img",{staticClass:"validCode",attrs:{id:"imgValidCode",src:t.valImgSrc,title:t.InvisibilityGiveitatry},on:{click:t.getValImgSrc}})]),i("div",{staticClass:"inputLine"},[i("span",{staticClass:"leftTitle4"},[t._v("短信验证")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.smsValidCode,expression:"form.smsValidCode"}],staticClass:"middleInput",attrs:{type:"text",placeholder:"请输入短信"},domProps:{value:t.form.smsValidCode},on:{input:function(e){e.target.composing||t.$set(t.form,"smsValidCode",e.target.value)}}}),i("span",{staticClass:"validButton",attrs:{disabled:t.getValidSmsState},on:{click:function(e){return t.getValidCode()}}},[t._v(t._s(t.btnText))])])]),i("div",{staticClass:"bottom",on:{click:function(e){return t.submitTest()}}},[t._v(" 提交预约 ")])]),i("alert",{ref:"alertPart"})],1)},a=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"topBC"},[i("img",{attrs:{src:o("1658"),width:"110px",height:"45px"}})])}],s=(o("2bd2"),o("b8a1")),n=o("a8da"),r=o("2dc0"),l=o("b66f"),m=(o("64da"),o("21a7"),o("fed1")),c={data:function(){return{dateTexttimer:"",btnText:"获取短信",getValidSmsState:!1,InvisibilityGiveitatry:"无效?再点一下试试吧!",valImgSrc:"",backgroundImg:"",form:{name:"",age:5,height:"",weight:"",testShopId:"",testTimeId:"",testItemId:"",ftgId:"",phone:"",imgValidCode:"",picValidCode:"",smsValidCode:"",sex:"",ageOptions:this.getAge(),shopOptions:[],timeOptions:[],testOptions:[]},list:[]}},mounted:function(){this.getValImgSrc(),this.getShopList(),localStorage.phone&&(this.form.phone=localStorage.phone)},destroyed:function(){},watch:{$route:function(t){"testMembership"==t.name&&(this.getValImgSrc(),this.getShopList(),localStorage.phone&&(this.form.phone=localStorage.phone))},active:function(){this.getList()}},methods:{onChange:function(t){console.log(t.format("YY-MM-DD"))},alertInfo:function(t){this.$refs.alertPart.openSimpleDialog(t)},confirmDay:function(t){console.log(globaltime2StringNoMin(t))},getAge:function(){for(var t=[],e=5;e<16;e++)t.push({label:e+"岁",value:e});return t},getShopList:function(){var t=this,e={},o=m.stringify(e);Object(s["L"])(o).then((function(e){var o=e;0==o.Code&&(t.form.shopOptions=jsonToOptionBySimpleShop(o.Rs),t.form.shopOptions.length>0&&(t.form.testShopId=t.form.shopOptions[0].value,t.getTimeItemOptions()))}))},getTimeItemOptions:function(){var t=this;t.getShopTimeList(),t.getShopItemList()},getShopTimeList:function(){var t=this,e=this,o={shopId:e.form.testShopId},i=m.stringify(o);Object(s["a"])(i).then((function(o){var i=o;0==i.Code&&(i.Rs.length>0?(e.form.timeOptions=jsonToOptionByShopTimeList(i.Rs),e.form.testTimeId=e.form.timeOptions[0].key):(1==t.pageType&&e.Toast("该店预约已满"),e.form.timeOptions=[],e.form.testTimeId=""))}))},getShopItemList:function(){var t=this,e={shopId:t.form.testShopId},o=m.stringify(e);Object(s["c"])(o).then((function(e){var o=e;0==o.Code&&o.Rs.length>0&&(t.form.testOptions=jsonToOptionByShopItemList(o.Rs),t.form.testItemId=t.form.testOptions[0].key)}))},getValImgSrc:function(){var t=this,e={token:localStorage.token,width:100,height:30,noiseCount:1,length:4,source:123456789},o=m.stringify(e);Object(s["e"])(o).then((function(e){var o=e;t.valImgSrc=o.Pic,t.valImgId=o.Id}))},getValidCode:function(){var t=this,e=this;if(!e.getValidSmsState){var o=e.form.phone,i=e.form.picValidCode;if(!o)return e.Toast("手机号不能为空"),!1;if(11!=o.length)return e.Toast("手机号只能是11位"),!1;if(!globalCheckPhone(o))return e.Toast("手机号格式不正确"),!1;if(!i)return e.Toast("图形验证码不能为空"),!1;if(4!=i.length)return e.Toast("图形验证码只能是4位"),!1;var a={token:localStorage.token,phone:o,codeType:2,picId:this.valImgId,picCode:i,oType:1},n=m.stringify(a);Object(s["t"])(n).then((function(o){var i=o;0==i.Code?(e.Toast("短信验证码已发送","success"),e.calcTime()):(e.Toast(i.Memo),1003==i.Code&&(t.getValImgSrc(),e.form.picValidCode=""))}))}},calcTime:function(){var t=60,e=this;e.getValidSmsState=!0,e.btnText=t+"S";var o=setInterval((function(){0==t?(clearInterval(o),e.getValidSmsState=!1,e.btnText="重新发送"):(t--,e.btnText=t+"S")}),1e3)},submitTest:function(){var t=this,e=this;if(!e.form.name)return e.Toast("姓名不能为空"),!1;if(!e.form.age)return e.Toast("请填写年龄"),!1;if(parseInt(e.form.height)>200||parseInt(e.form.height)<90)return e.Toast("请输入正确的身高"),!1;if(parseInt(e.form.weight)>120||parseInt(e.form.weight)<10)return e.Toast("请输入正确的体重"),!1;if(!e.form.testShopId)return e.Toast("请选择商家"),!1;if(!e.form.testTimeId)return e.Toast("请选择预约时间"),!1;if(!e.form.testItemId)return e.Toast("请选择预约项目"),!1;if(11!=e.form.phone.length)return e.Toast("请输入正确的手机号"),!1;if(!e.form.phone)return e.Toast("手机不能为空"),!1;if(!e.form.smsValidCode)return e.Toast("短信验证码不能为空"),!1;var o={codId:e.form.testTimeId,figId:e.form.testItemId,phone:e.form.phone,code:e.form.smsValidCode,name:e.form.name,sex:e.form.sex,age:e.form.age,height:e.form.height,weight:e.form.weight,openId:localStorage.openId?localStorage.openId:""};Object(s["w"])(m.stringify(o)).then((function(o){var i=o;if(0==i.Code){var a=t;localStorage.phone=a.form.phone,t.$router.push({path:"testMembershipAddress",query:{oftId:i.OftId,phone:a.form.phone,orderTime:i.CanOrderDate,orderShop:i.ShopName,orderAddress:i.Addr,pageType:2}})}else e.alertInfo(i.Memo),e.getShopItemList()}))},onGoNewPage:function(t){this.$router.push({path:"/"+t})},goPage:function(t){this.$router.push({path:t})}},beforeDestroy:function(){clearInterval(this.dateTexttimer)},beforeRouteEnter:function(t,e,o){o((function(e){""==t.name&&e.getList()}))},components:{bottomTab:n["a"],alert:r["a"],DatePicker:l["default"]}},d=c,p=(o("ed3d"),o("cba8")),f=Object(p["a"])(d,i,a,!1,null,"e7cf4096",null);e["default"]=f.exports},ed3d:function(t,e,o){"use strict";o("fb48")},fb48:function(t,e,o){}}]); //# sourceMappingURL=chunk-7df78eaa.undefined.1663065776174.js.map