chunk-d7d875ec.undefined.1670827382509.js 11 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d7d875ec"],{"0a8b":function(t,e,i){"use strict";i("219b")},1658:function(t,e,i){t.exports=i.p+"img/logo_memberShip.d29be70c.png"},"219b":function(t,e,i){},"8c59":function(t,e,i){"use strict";i.r(e);var o=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{style:t.backgroundImg,attrs:{id:"mainPage"}},[t._m(0),o("div",{staticClass:"title"},[o("span",[t._v("入会测评预约")]),o("img",{attrs:{src:i("8b19"),width:"69px",height:"86px"}}),o("em",{staticClass:"button",on:{click:function(e){return t.onGoNewPage("testMemberNavi")}}},[t._v("主页")])]),o("div",{staticClass:"context"},[o("div",{staticClass:"bodyInfoArea",staticStyle:{"margin-top":"85px"}},[o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle"},[t._v("姓名")]),o("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)}}})]),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle"},[t._v("年龄")]),o("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 o("mu-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle"},[t._v("身高")]),o("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)}}}),o("em",[t._v("CM")])]),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle"},[t._v("体重")]),o("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)}}}),o("em",[t._v("KG")])]),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle"},[t._v("性别")]),o("div",{staticClass:"sexDiv"},[o("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")}}}),o("label",{staticStyle:{color:"#FFFFFF"},attrs:{for:"radio_man"}},[t._v("男")])]),o("div",{staticClass:"sexDiv"},[o("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")}}}),o("label",{staticStyle:{color:"#FFFFFF"},attrs:{for:"radio_woman"}},[t._v("女")])])])]),o("div",{staticClass:"bodyInfoArea"},[o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle4"},[t._v("训练场馆")]),o("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 o("mu-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle4"},[t._v("预约时间")]),o("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 o("mu-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle4"},[t._v("项目")]),o("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 o("mu-option",{key:t.value,staticStyle:{"!important color":"white"},attrs:{label:t.label,value:t.value}})})),1)],1),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle4"},[t._v("手机号码")]),o("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)}}})]),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle4"},[t._v("图形验证")]),o("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)}}}),o("img",{staticClass:"validCode",attrs:{id:"imgValidCode",src:t.valImgSrc,title:t.InvisibilityGiveitatry},on:{click:t.getValImgSrc}})]),o("div",{staticClass:"inputLine"},[o("span",{staticClass:"leftTitle4"},[t._v("短信验证")]),o("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)}}}),o("span",{staticClass:"validButton",attrs:{disabled:t.getValidSmsState},on:{click:function(e){return t.getValidCode()}}},[t._v(t._s(t.btnText))])])]),o("div",{staticClass:"bottom",on:{click:function(e){return t.submitTest()}}},[t._v(" 提交预约 ")])]),o("alert",{ref:"alertPart"})],1)},a=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"topBC"},[o("img",{attrs:{src:i("1658"),width:"110px",height:"45px"}})])}],s=(i("2bd2"),i("b8a1")),n=i("a8da"),r=i("2dc0"),l=i("b66f"),m=(i("64da"),i("21a7"),i("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:{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={},i=m.stringify(e);Object(s["P"])(i).then((function(e){var i=e;0==i.Code&&(t.form.shopOptions=jsonToOptionBySimpleShop(i.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,i={shopId:e.form.testShopId},o=m.stringify(i);Object(s["a"])(o).then((function(i){var o=i;0==o.Code&&(o.Rs.length>0?(e.form.timeOptions=jsonToOptionByShopTimeList(o.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},i=m.stringify(e);Object(s["e"])(i).then((function(e){var i=e;0==i.Code&&i.Rs.length>0&&(t.form.testOptions=jsonToOptionByShopItemList(i.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},i=m.stringify(e);Object(s["g"])(i).then((function(e){var i=e;t.valImgSrc=i.Pic,t.valImgId=i.Id}))},getValidCode:function(){var t=this,e=this;if(!e.getValidSmsState){var i=e.form.phone,o=e.form.picValidCode;if(!i)return e.Toast("手机号不能为空"),!1;if(11!=i.length)return e.Toast("手机号只能是11位"),!1;if(!globalCheckPhone(i))return e.Toast("手机号格式不正确"),!1;if(!o)return e.Toast("图形验证码不能为空"),!1;if(4!=o.length)return e.Toast("图形验证码只能是4位"),!1;var a={token:localStorage.token,phone:i,codeType:2,picId:this.valImgId,picCode:o,oType:1},n=m.stringify(a);Object(s["w"])(n).then((function(i){var o=i;0==o.Code?(e.Toast("短信验证码已发送","success"),e.calcTime()):(e.Toast(o.Memo),1003==o.Code&&(t.getValImgSrc(),e.form.picValidCode=""))}))}},calcTime:function(){var t=60,e=this;e.getValidSmsState=!0,e.btnText=t+"S";var i=setInterval((function(){0==t?(clearInterval(i),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.sex)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 i={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["z"])(m.stringify(i)).then((function(i){var o=i;if(0==o.Code){var a=t;localStorage.phone=a.form.phone,t.$router.push({path:"testMembershipAddress",query:{oftId:o.OftId,phone:a.form.phone,orderTime:o.CanOrderDate,orderShop:o.ShopName,orderAddress:o.Addr,pageType:2}})}else e.alertInfo(o.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,i){i((function(e){""==t.name&&e.getList()}))},components:{bottomTab:n["a"],alert:r["a"],DatePicker:l["default"]}},d=c,p=(i("0a8b"),i("cba8")),u=Object(p["a"])(d,o,a,!1,null,"0c9884e6",null);e["default"]=u.exports}}]);
  2. //# sourceMappingURL=chunk-d7d875ec.undefined.1670827382509.js.map