webpackJsonp([41],{"4R6/":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o("YhRe"),n=o("765u"),a=o("TfkN"),s=o("sHg/"),c={name:"register",components:{LogoTips:i.a},data:function(){return{mobilePhone:"",verifyCode:"",getTimeStr:"获取验证码",password:"",passwordType:!1,inputData:{mobilePhone:!1,verifyCode:!1,password:!1},time:60,errorMsg:{isShow:!1,content:""},dialogCom:{},isSetPwd:!1,captcha:"",canSend:!0,canClickBtn:!0,newTime:"",isBrowse:!1,isReset:!0}},watch:{mobilePhone:function(e){this.mobilePhone=n.a.formatMobile(e),this.inputData.mobilePhone=!!e},verifyCode:function(e){this.verifyCode=n.a.formatVerifyCode(e),this.inputData.verifyCode=!!e},password:function(e){this.inputData.password=!!e},newTime:function(e){e&&this.init()}},computed:{isDisabled:{get:function(){return!(this.time>0&&this.time<60||!this.canSend||""==this.mobilePhone)},set:function(e){return e}},canClick:function(){return!this.isSetPwd&&""!=this.mobilePhone&&""!=this.verifyCode||!(!this.isSetPwd||""==this.password)},wHeightStyle:function(){if(this.isBrowse)return{minHeight:(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+"px"}}},activated:function(){this.isBrowse=!0,this.newTime=localStorage.getItem("gotoRegisterTime")||""},deactivated:function(){this.inputData={mobilePhone:!1,verifyCode:!1,password:!1},this.errorMsg={isShow:!1,content:""},this.isBrowse=!1},methods:{preventScroll:function(e){e.preventDefault()},init:function(){this.clearSettime(),this.password="",this.mobilePhone="",this.verifyCode="",this.getTimeStr="获取验证码",this.passwordType=!1,this.time=60,this.isSetPwd=!1,this.captcha="",this.canSend=!0,this.canClickBtn=!0},goToPage:function(e){e&&this.$router.push(e)},gotoBack:function(){if(this.isSetPwd){var e=this;e.showDialogCom({content:"登录密码还未设置完成，是否继续？",type:"confirm",canceltxt:"退出",ozbtn:"继续",cancelCallback:function(){e.isSetPwd=!1}})}else this.goBack()},clearIconToggle:function(e,t){this.inputData[e]="focus"==t&&this[e].length>0},clearInput:function(e){this[e]=""},clickNoCodeQ:function(){a.a.clickVerifyCodeLog(this.mobilePhone,2),this.showDialogCom({title:"收不到验证码？",type:"verifycode",effect:"commonP",ozbtn:"知道了"})},showHidePW:function(){this.passwordType=!this.passwordType},clickBtn:function(){if(this.canClick&&this.canClickBtn){var e=this,t={mobile:e.mobilePhone.replace(/[^\d]/g,""),verifycode:e.verifyCode};if(e.captcha){var o=s.default.getCookie("verifyid");t.captcha=e.captcha,t.verifyid=o}if(this.isSetPwd)t.pw=e.password,e.canClickBtn=!1,e.clearSettime(),a.a.ajaxRegister(t,function(t){e.canClickBtn=!0,e.captcha="",0===t.code?(s.default.setCookie("dlPhone",e.mobilePhone,!1,".xidibuy.com"),e.loginJump(t.data)):-15e3==t.code||t.data&&1==t.data.need_captcha?n.a.showCaptchaDialog(e,"clickBtn"):n.a.showToast(e,t.msg)});else{if(!this.mobileCheck())return;e.canClickBtn=!1,t.type="reg",a.a.checkSmsMobile(t,function(t){e.canClickBtn=!0,e.captcha="",0==t.code?(e.clearSettime(),e.isSetPwd=!0):-15e3==t.code?n.a.showCaptchaDialog(e,"clickBtn"):-16121==t.code?e.alreadyRegister():n.a.showToast(e,t.msg)})}}},mobileCheck:function(){var e=n.a.checkMobile(this.mobilePhone);return!!e.state||(n.a.showToast(this,e.error),!1)},ajaxSendMobile:function(){var e=this;if(e.isDisabled){if(!this.mobileCheck())return;e.canSend=!1;var t={mobile:e.mobilePhone.replace(/[^\d]/g,""),type:"reg"};if(n.a.testsolt(e,t),e.captcha){var o=s.default.getCookie("verifyid");t.captcha=e.captcha,t.verifyid=o}a.a.ajaxSendMobile(t,function(t){e.captcha="",0==t.code?e.mobileTime():-15e3==t.code?(e.canSend=!0,n.a.showCaptchaDialog(e,"ajaxSendMobile")):-16121==t.code||-16206==t.code?(e.alreadyRegister(),e.canSend=!0):(n.a.showToast(e,t.msg),e.canSend=!0)})}},alreadyRegister:function(){var e=this;e.showDialogCom({title:"该手机号已经被注册",content:"<p>你已经注册过<span>"+e.mobilePhone.replace(/[^\d]/g,"")+"</span>手机账号，</p><p>可以直接用该手机号登录</p>",type:"confirm",ozbtn:"去登录",effect:"commonP",submitCallback:function(){localStorage.setItem("dynamicLogin",1),s.default.setCookie("dlPhone",e.mobilePhone,!1,".xidibuy.com"),e.$route.query.fromPage&&e.$router.go(-1),e.$router.replace("/user")}})},closeLogoTips:function(){n.a.closeToast(this)},mobileTime:function(){var e=this,t="";e.settime=setInterval(function(){e.time--,0==e.time?e.clearSettime():(t=e.time+"秒后重发",e.getTimeStr=t)},1e3)},clearSettime:function(){this.settime&&(this.canSend=!0,this.time=60,this.isDisabled=!0,this.getTimeStr="获取验证码",clearInterval(this.settime))},captchaOk:function(e){e&&(e.captcha&&(this.captcha=e.captcha),this[e.cb]&&this[e.cb]())},captchaError:function(e){n.a.showToast(this,e)}}},r={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"mobile-box",style:e.wHeightStyle,on:{touchmove:function(t){t.preventDefault(),e.preventScroll(t)}}},[o("header",{staticClass:"mobile-head"},[o("div",{staticClass:"head_left",on:{click:e.gotoBack}},[o("i",{staticClass:"icon icon_triangle_left"})]),e._v(" "),e.isSetPwd?o("div",{staticClass:"head_title"},[e._v("设置登录密码")]):e._e()]),e._v(" "),e.isSetPwd?e._e():o("div",{staticClass:"mobile-logo"},[o("a",{attrs:{href:"/"}},[o("img",{staticClass:"logo-img",attrs:{src:e.JS_DOMAIN+"/m/static/global/images/1.0.0/login-logo.png"}})])]),e._v(" "),o("div",{staticClass:"mobile-body"},[e.isSetPwd?o("p",{staticClass:"top-txt mt56"},[e._v("为了确保账户安全，请设置登录密码")]):e._e(),e._v(" "),e.isSetPwd?[o("div",{staticClass:"input-box password-box"},["checkbox"==(e.passwordType?"text":"password")?o("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"mobile-input",attrs:{maxlength:"16",placeholder:"请输入6-16位字母、数字或符合组合",type:"checkbox"},domProps:{checked:Array.isArray(e.password)?e._i(e.password,null)>-1:e.password},on:{focus:function(t){t.preventDefault(),e.clearIconToggle("password","focus")},blur:function(t){t.preventDefault(),e.clearIconToggle("password","blur")},change:function(t){var o=e.password,i=t.target,n=!!i.checked;if(Array.isArray(o)){var a=e._i(o,null);i.checked?a<0&&(e.password=o.concat([null])):a>-1&&(e.password=o.slice(0,a).concat(o.slice(a+1)))}else e.password=n}}}):"radio"==(e.passwordType?"text":"password")?o("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"mobile-input",attrs:{maxlength:"16",placeholder:"请输入6-16位字母、数字或符合组合",type:"radio"},domProps:{checked:e._q(e.password,null)},on:{focus:function(t){t.preventDefault(),e.clearIconToggle("password","focus")},blur:function(t){t.preventDefault(),e.clearIconToggle("password","blur")},change:function(t){e.password=null}}}):o("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"mobile-input",attrs:{maxlength:"16",placeholder:"请输入6-16位字母、数字或符合组合",type:e.passwordType?"text":"password"},domProps:{value:e.password},on:{focus:function(t){t.preventDefault(),e.clearIconToggle("password","focus")},blur:function(t){t.preventDefault(),e.clearIconToggle("password","blur")},input:function(t){t.target.composing||(e.password=t.target.value)}}}),e._v(" "),o("i",{directives:[{name:"show",rawName:"v-show",value:e.inputData.password,expression:"inputData.password"}],staticClass:"icon icon_unfinished",on:{click:function(t){e.clearInput("password")}}}),e._v(" "),o("i",{staticClass:"icon icon icon_password_hide",class:{icon_password_show:e.passwordType},on:{click:e.showHidePW}})])]:[o("div",{staticClass:"input-box"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.mobilePhone,expression:"mobilePhone"}],staticClass:"mobile-input",attrs:{type:"tel",maxlength:"13",placeholder:"请输入手机号"},domProps:{value:e.mobilePhone},on:{focus:function(t){t.preventDefault(),e.clearIconToggle("mobilePhone","focus")},blur:function(t){t.preventDefault(),e.clearIconToggle("mobilePhone","blur")},input:function(t){t.target.composing||(e.mobilePhone=t.target.value)}}}),e._v(" "),o("i",{directives:[{name:"show",rawName:"v-show",value:e.inputData.mobilePhone,expression:"inputData.mobilePhone"}],staticClass:"icon icon_unfinished",on:{click:function(t){e.clearInput("mobilePhone")}}})]),e._v(" "),o("div",{staticClass:"input-box code-box"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.verifyCode,expression:"verifyCode"}],staticClass:"mobile-input",attrs:{type:"tel",maxlength:"4",placeholder:"请输入短信验证码"},domProps:{value:e.verifyCode},on:{focus:function(t){t.preventDefault(),e.clearIconToggle("verifyCode","focus")},blur:function(t){t.preventDefault(),e.clearIconToggle("verifyCode","blur")},input:function(t){t.target.composing||(e.verifyCode=t.target.value)}}}),e._v(" "),o("i",{directives:[{name:"show",rawName:"v-show",value:e.inputData.verifyCode,expression:"inputData.verifyCode"}],staticClass:"icon icon_unfinished",on:{click:function(t){e.clearInput("verifyCode")}}}),e._v(" "),o("p",{staticClass:"code-txt",class:""!=e.mobilePhone&&e.canSend?"":"code-disstyle",on:{click:e.ajaxSendMobile}},[e._v(e._s(e.getTimeStr))])])],e._v(" "),o("div",{staticClass:"mobile-btn",class:{"btn-disable":!e.canClick,"setPwd-btn":e.isSetPwd},on:{click:e.clickBtn}},[e.isSetPwd?o("span",[e._v("完成")]):o("span",[e._v("立即注册")])]),e._v(" "),e.isSetPwd?e._e():o("div",{staticClass:"mobile-bottom"},[o("span",{staticClass:"bottom-right",on:{click:e.clickNoCodeQ}},[e._v("收不到验证码?")])])],2),e._v(" "),e.isSetPwd?e._e():o("div",{staticClass:"bottom-txt",on:{click:function(t){e.goToPage("/register/policy")}}},[e._v("\n        已阅读并同意"),o("span",[e._v("《喜地服务协议》")])]),e._v(" "),o("logo-tips",{attrs:{content:e.errorMsg.content,isShowErrormsg:e.errorMsg.isShow},on:{closeLogoTips:e.closeLogoTips}}),e._v(" "),o("dialog-com",{attrs:{dialog:e.dialogCom},on:{captchaError:e.captchaError,captchaOk:e.captchaOk}})],1)},staticRenderFns:[]};var l=o("VU/8")(c,r,!1,function(e){o("yExV")},"data-v-5995b8b8",null);t.default=l.exports},YrzN:function(e,t,o){(e.exports=o("FZ+f")(!1)).push([e.i,"\n.mobile-box[data-v-5995b8b8] {\n  position: relative;\n  overflow: hidden;\n}\n.mobile-head[data-v-5995b8b8] {\n  position: relative;\n  height: 4rem;\n  line-height: 4rem;\n  width: 100%;\n  left: 0;\n  top: 0;\n  color: #333;\n  font-size: 1.5rem;\n}\n.mobile-head .head_left[data-v-5995b8b8] {\n    position: absolute;\n    left: 1.25rem;\n}\n.mobile-head .head_right[data-v-5995b8b8] {\n    position: absolute;\n    top: 0;\n    right: 2.5rem;\n    color: #ddd;\n}\n.mobile-head .head_title[data-v-5995b8b8] {\n    width: 100%;\n    text-align: center;\n}\n.mobile-body[data-v-5995b8b8] {\n  margin: 0 auto;\n  padding: 0 3.08333rem;\n}\n.mobile-btn[data-v-5995b8b8] {\n  margin: 0 auto;\n  height: 3.75rem;\n  text-align: center;\n  line-height: 3.75rem;\n  background-color: #5fd9da;\n  color: #fff;\n  font-size: 1.25rem;\n}\n.btn-disable[data-v-5995b8b8] {\n  background-color: #97d2d3;\n  color: #e5e5e5;\n}\ninput[data-v-5995b8b8]:-webkit-autofill, textarea[data-v-5995b8b8]:-webkit-autofill, select[data-v-5995b8b8]:-webkit-autofill {\n  background-color: #ffffff !important;\n  background-image: none !important;\n  color: black !important;\n  -webkit-tap-highlight-color: transparent !important;\n  -webkit-box-shadow: 0 0 0px 1000px white inset !important;\n}\n.mobile-logo[data-v-5995b8b8] {\n  margin-top: 1.5rem;\n  padding-bottom: 3.33333rem;\n  text-align: center;\n}\n.mobile-logo .logo-img[data-v-5995b8b8] {\n    width: 17.58333rem;\n    height: auto;\n}\n.mobile-body .top-txt[data-v-5995b8b8] {\n  margin-top: 1.5rem;\n  padding-bottom: 2.33333rem;\n  font-size: 1rem;\n  color: #222222;\n}\n.mobile-body .input-box[data-v-5995b8b8] {\n  position: relative;\n  border-bottom: 1px solid #cccccc;\n  font-size: 1.08333rem;\n}\n.mobile-body .input-box .mobile-input[data-v-5995b8b8] {\n    width: 100%;\n    height: 2.33333rem;\n    font-size: 1.5rem;\n    line-height: 2.33333rem;\n    color: #222222;\n}\n.mobile-body .input-box .icon[data-v-5995b8b8] {\n    position: absolute;\n    top: 0.33333rem;\n    right: 0;\n    padding-left: 0.83333rem;\n    font-size: 1.33333rem;\n    color: #c5c5c5;\n}\n.mobile-body .input-box input[data-v-5995b8b8]::-webkit-input-placeholder {\n    font-size: 1.08333rem;\n    color: #cccccc;\n    font-weight: normal;\n}\n.mobile-body .code-box[data-v-5995b8b8] {\n  margin-top: 2.33333rem;\n}\n.mobile-body .code-box .icon[data-v-5995b8b8] {\n    top: 0.5rem;\n    right: 5.83333rem;\n}\n.mobile-body .code-box .code-txt[data-v-5995b8b8] {\n    position: absolute;\n    right: 0;\n    top: 0.33333rem;\n}\n.mobile-body .code-box .code-disstyle[data-v-5995b8b8] {\n    color: #cccccc;\n}\n.mobile-body .mobile-bottom[data-v-5995b8b8] {\n  margin-top: 1.58333rem;\n  font-size: 1.08333rem;\n  color: #777;\n}\n.mobile-body .mobile-bottom .bottom-right[data-v-5995b8b8] {\n    float: right;\n}\n.mobile-body .password-box[data-v-5995b8b8] {\n  margin-top: 2.33333rem;\n}\n.mobile-body .password-box .icon_unfinished[data-v-5995b8b8] {\n    top: 0.58333rem;\n    right: 2.5rem;\n}\n.mobile-body .password-box .icon_password_hide[data-v-5995b8b8] {\n    font-size: 1.66667rem;\n}\n.mobile-body .password-box .icon_password_show[data-v-5995b8b8] {\n    color: #5fd9da;\n}\n.mobile-body .mobile-btn[data-v-5995b8b8] {\n  margin-top: 5rem;\n}\n.bottom-txt[data-v-5995b8b8] {\n  position: absolute;\n  bottom: 2.5rem;\n  width: 100%;\n  text-align: center;\n  font-size: 1rem;\n  color: #777;\n}\n.bottom-txt span[data-v-5995b8b8] {\n    color: #0261b9;\n}\n.mobile-box .mobile-body .mt56[data-v-5995b8b8] {\n  margin-top: 2.33333rem;\n}\n.mobile-box .mobile-body .setPwd-btn[data-v-5995b8b8] {\n  margin-top: 10.41667rem;\n}\n",""])},yExV:function(e,t,o){var i=o("YrzN");"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);o("rjj0")("e6e8acdc",i,!0,{})}});