chunk-365e372b.1589958426558.js 27.2 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-365e372b"],{"366e":function(e,t,i){"use strict";var o=i("e9e4"),s=i.n(o);s.a},"531c":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAQCAYAAADNo/U5AAAA+klEQVQokb3RoU4DURCF4W+bDaYkaxG4rkUQJIYXAFNUN4GkD1BQOBwYHFhQJIsC3gESQggSg7iKF6AraEC0i+mGTdMWFEdMMnfOPye5E5VlqVKRpYs4RAfLeMMVjpI8fFS+qIKKLG3iDqu4xgtWsI1nbCR5+ITYj/axhnaSh9taenu8pIcTaNSgTTzWAUjycIMnbFVvdWgJwXTd12fxxHA0jUjycFDvo36ntYNdrKOP1xlpMMRl1O+0vhDhAcUcIBkvHsVYwFmSh705ACiy9BS96iPefwPqvsZvrmn6f2jyXrMUV6VEt8jSAQZzgCa6FXQxbo7/kDTE+TdhVEJawb8vlQAAAABJRU5ErkJggg=="},8177:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAUCAYAAAC9BQwsAAAAzUlEQVQ4je3TsUrDcBTF4a9p9ryAItIMxcWhQ9cOIrg5N2AHwUdwUaRDpz5CNwt5B9/EDkF8hGYVazs0BUlT/c/ime498LvnLqe1HHYuMMOpML3htrUcdt4rY46vX6AII6xinGCS5MVTSFyZpREe4mo/LrN0EPjqEezALq4Dwe538CXJi3EIVWbpGP0oMGVP/+DfAOMms8zSNu6xxjTJi73WHEq8whnOcflTYrvmv6JXzYsmZlfkCM9YNRz9rHk3+IhtGz3D44G361rgbgMMKicPFmVI2AAAAABJRU5ErkJggg=="},a86a:function(e,t,i){"use strict";i.r(t);var o=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("modal-comp",{attrs:{visible:e.modalVisiable,"show-confirm":!1,icon:e.modalIcon,content:e.modalContent,confirm:e.modalCallback,overlay:e.modalCallback}}),o("modal-simple-comp",{attrs:{visible:e.modalSimpleVisiable,"show-confirm":!1,icon:e.modalIcon,content:e.modalContent,confirm:e.closeModal,overlay:e.closeModal,close:e.closeModal}}),o("modal-upload-card-comp",{attrs:{visible:e.modalUploadCardVisiable,"show-confirm":!0,content:e.modalContent,confirm:e.modalCallback,overlay:e.modalCallback,close:e.closeCallback}}),o("modal-protocol-comp",{attrs:{visible:e.modalProtocolVisiable,overlay:e.closeModal,close:e.closeModal}}),o("div",{staticClass:"ebg"}),o("div",{staticClass:"content"},[o("div",{staticClass:"top-space"}),o("div",{staticClass:"box"},[1==e.type?o("div",{staticClass:"login"},[e.oneAccountCenterOff?[o("div",{staticClass:"login-nav"},[o("div",{staticClass:"login-nav-tit text-c pointer active"},[e._v(e._s(e.$t("login.loginType1")))])]),o("div",{staticClass:"gird-g form"},[o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:i("490f")}}),e._v(" "+e._s(e.$t("login.account"))+"\n                ")]),o("div",{staticClass:"ipt-wrap"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.loginForm.userId,expression:"loginForm.userId"}],staticClass:"ipt",class:{err:e.errorTips.e1.length>0},attrs:{placeholder:e.$t("login.accountPlaceholder"),type:"text"},domProps:{value:e.loginForm.userId},on:{blur:e.userIdLegalCheck,input:function(t){t.target.composing||e.$set(e.loginForm,"userId",t.target.value)}}})]),e.errorTips.e1.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.e1)+"\n                ")]):e._e()]),o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:i("8177")}}),e._v(" "+e._s(e.$t("login.SMSVerificationCode"))+"\n                ")]),o("div",{staticClass:"ipt-wrap"},[o("div",{staticClass:"ipt ipt2",class:{err:e.errorTips.oe2.length>0}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.loginForm.otp,expression:"loginForm.otp"}],staticClass:"ipt-code",attrs:{placeholder:e.$t("login.verifyCodePlaceholder"),type:"text"},domProps:{value:e.loginForm.otp},on:{input:function(t){t.target.composing||e.$set(e.loginForm,"otp",t.target.value)}}}),0==e.times.remain?o("div",{staticClass:"veri-btn pointer",on:{click:e.sendOTPWhenOneAccountCenterOff}},[e._v(e._s(e.$t("register.verifyCodeGet")))]):o("div",{staticClass:"veri-btn-default"},[e._v(e._s(e.times.tip))])])]),e.errorTips.oe2.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.oe2)+"\n                ")]):e._e()])]),o("div",{staticClass:"login-protocol pointer",class:{loginLeft:"en"!=e.locale},on:{click:function(t){e.loginCheck.agreeProtocol=!e.loginCheck.agreeProtocol}}},[e.loginCheck.agreeProtocol?e._e():o("img",{staticClass:"check",attrs:{src:i("7a73")}}),e.loginCheck.agreeProtocol?o("img",{staticClass:"check",attrs:{src:i("d202")}}):e._e(),e._v(e._s(e.$t("login.agree"))+"  \n              "),o("span",{staticClass:"protocol pointer",on:{click:function(t){return e.onProtocolHandler()}}},[e._v(e._s(e.$t("login.protocol")))])]),o("div",{staticClass:"login-submit pointer flex-center",class:{disabled:e.pwdLoginDisabledOneAccountCenterOff},on:{click:function(t){return e.pwdLoginWhenOneAccountCenterOff()}}},[e.loading?o("van-loading"):e._e(),o("span",[e._v(e._s(e.$t("login.login")))])],1),o("div",{staticClass:"login-func"},[o("div",{staticClass:"login-func-btn pointer",on:{click:function(t){return e.toRegisterPage()}}},[e._v(e._s(e.$t("login.register")))])])]:[o("div",{staticClass:"login-tit"},["zh"==e.locale?o("img",{attrs:{src:i("7437")}}):e._e(),"tc"==e.locale?o("img",{attrs:{src:i("7fba")}}):e._e(),"en"==e.locale?o("img",{staticClass:"img-en",attrs:{src:i("0b7c")}}):e._e()]),o("div",{staticClass:"login-nav"},[o("div",{staticClass:"login-nav-tit text-r pointer active",on:{click:function(t){return e.onLoginTypeHandler(1)}}},[e._v(e._s(e.$t("login.loginType1")))]),o("div",{staticClass:"login-nav-v-line"}),o("div",{staticClass:"login-nav-tit pointer",on:{click:function(t){return e.onLoginTypeHandler(2)}}},[e._v(e._s(e.$t("login.loginType2")))])]),o("div",{staticClass:"gird-g form"},[o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:i("490f")}}),e._v(" "+e._s(e.$t("login.account"))+"\n                ")]),o("div",{staticClass:"ipt-wrap"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.loginForm.userId,expression:"loginForm.userId"}],staticClass:"ipt",class:{err:e.errorTips.e1.length>0},attrs:{placeholder:e.$t("login.accountPlaceholder"),type:"text"},domProps:{value:e.loginForm.userId},on:{blur:e.userIdLegalCheck,input:function(t){t.target.composing||e.$set(e.loginForm,"userId",t.target.value)}}})]),e.errorTips.e1.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.e1)+"\n                ")]):e._e()]),o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:i("531c")}}),e._v(" "+e._s(e.$t("login.password"))+"\n                ")]),o("div",{staticClass:"ipt-wrap"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.loginForm.password,expression:"loginForm.password"}],staticClass:"ipt",class:{err:e.errorTips.e2.length>0},attrs:{placeholder:e.$t("login.passwordPlaceholder"),type:"password"},domProps:{value:e.loginForm.password},on:{input:function(t){t.target.composing||e.$set(e.loginForm,"password",t.target.value)}}})]),e.errorTips.e2.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.e2)+"\n                ")]):e._e()]),1==e.type&&e.loginCheck.showImageCode?o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"ipt-wrap"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.loginForm.imageValue,expression:"loginForm.imageValue"}],staticClass:"ipt ipt-verify",class:{err:e.errorTips.e3.length>0},attrs:{placeholder:e.$t("login.verifyPlaceholder"),type:"text"},domProps:{value:e.loginForm.imageValue},on:{input:function(t){t.target.composing||e.$set(e.loginForm,"imageValue",t.target.value)}}}),o("div",{staticClass:"ipt verify-btn pointer vcode",on:{click:e.handlerRefreshImageValue}},[o("img",{attrs:{src:e.values.imageBase64}})])]),e.errorTips.e3.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.e3)+"\n                ")]):e._e()]):e._e()]),o("div",{staticClass:"login-protocol pointer",class:{loginLeft:"en"!=e.locale},on:{click:function(t){e.loginCheck.agreeProtocol=!e.loginCheck.agreeProtocol}}},[e.loginCheck.agreeProtocol?e._e():o("img",{staticClass:"check",attrs:{src:i("7a73")}}),e.loginCheck.agreeProtocol?o("img",{staticClass:"check",attrs:{src:i("d202")}}):e._e(),e._v(e._s(e.$t("login.agree"))+"  \n              "),o("span",{staticClass:"protocol pointer",on:{click:function(t){return e.onProtocolHandler()}}},[e._v(e._s(e.$t("login.protocol")))])]),o("div",{staticClass:"login-submit pointer flex-center",class:{disabled:e.pwdLoginDisabled},on:{click:function(t){return e.handlerLogin()}}},[e.loading?o("van-loading"):e._e(),o("span",[e._v(e._s(e.$t("login.login")))])],1),o("div",{staticClass:"login-func"},[o("div",{staticClass:"login-func-btn pointer",on:{click:function(t){return e.toRegisterPage()}}},[e._v(e._s(e.$t("login.register")))]),o("div",{staticClass:"login-func-btn pointer",on:{click:function(t){return e.onForgetHandler()}}},[e._v(e._s(e.$t("login.forget")))])])]],2):e._e(),2==e.type?o("div",{staticClass:"login"},[o("div",{staticClass:"login-tit"},["zh"==e.locale?o("img",{attrs:{src:i("7437")}}):e._e(),"tc"==e.locale?o("img",{attrs:{src:i("7fba")}}):e._e(),"en"==e.locale?o("img",{staticClass:"img-en",attrs:{src:i("0b7c")}}):e._e()]),o("div",{staticClass:"login-nav"},[o("div",{staticClass:"login-nav-tit text-r pointer",on:{click:function(t){return e.onLoginTypeHandler(1)}}},[e._v(" "+e._s(e.$t("login.loginType1")))]),o("div",{staticClass:"login-nav-v-line"}),o("div",{staticClass:"login-nav-tit pointer active",on:{click:function(t){return e.onLoginTypeHandler(2)}}},[e._v(" "+e._s(e.$t("login.loginType2")))])]),o("div",{staticClass:"gird-g form"},[o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:i("8177")}}),e._v(" "+e._s(e.$t("login.mobile"))+"\n              ")]),o("div",{staticClass:"ipt-wrap"},[o("div",{staticClass:"region-tel ipt-wrap"},[o("img",{staticClass:"down-arrow",attrs:{src:i("e282"),alt:""}}),o("el-select",{staticClass:"ipt",model:{value:e.mobileNoType,callback:function(t){e.mobileNoType=t},expression:"mobileNoType"}},e._l(e.mobileOptions,(function(e,t){return o("el-option",{key:t,attrs:{value:e.type,label:e.areaCode}})})),1)],1),o("div",{staticClass:"ipt ipt2",class:{err:e.errorTips.oe1.length>0}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.loginForm.mobileNo,expression:"loginForm.mobileNo"}],staticClass:"ipt-tel",class:{err:e.errorTips.oe1.length>0},attrs:{placeholder:e.mobileTip.placeHolder,type:"text"},domProps:{value:e.loginForm.mobileNo},on:{input:function(t){t.target.composing||e.$set(e.loginForm,"mobileNo",t.target.value)}}})])]),e.errorTips.oe1.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.oe1)+"\n              ")]):e._e()]),2==e.type&&e.loginCheck.showImageCode?o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"ipt-wrap"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.loginForm.imageValue,expression:"loginForm.imageValue"}],staticClass:"ipt ipt-verify",class:{err:e.errorTips.oe3.length>0},attrs:{placeholder:e.$t("login.verifyPlaceholder"),type:"text"},domProps:{value:e.loginForm.imageValue},on:{input:function(t){t.target.composing||e.$set(e.loginForm,"imageValue",t.target.value)}}}),o("div",{staticClass:"ipt verify-btn pointer vcode",on:{click:e.handlerRefreshImageValue}},[o("img",{attrs:{src:e.values.imageBase64}})])]),e.errorTips.oe3.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.oe3)+"\n              ")]):e._e()]):e._e(),o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:i("fb14")}}),e._v(" "+e._s(e.$t("login.verifyCode"))+"\n              ")]),o("div",{staticClass:"ipt-wrap"},[o("div",{staticClass:"ipt ipt2",class:{err:e.errorTips.oe2.length>0}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.loginForm.otp,expression:"loginForm.otp"}],staticClass:"ipt-code",attrs:{placeholder:e.$t("login.verifyCodePlaceholder"),type:"text"},domProps:{value:e.loginForm.otp},on:{input:function(t){t.target.composing||e.$set(e.loginForm,"otp",t.target.value)}}}),0==e.times.remain?o("div",{staticClass:"veri-btn pointer",on:{click:e.handlerStdSendOTP}},[e._v(e._s(e.$t("register.verifyCodeGet")))]):o("div",{staticClass:"veri-btn-default"},[e._v(e._s(e.times.tip))])])]),e.errorTips.oe2.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.oe2)+"\n              ")]):e._e()])]),o("div",{staticClass:"login-protocol pointer",on:{click:function(t){e.loginCheck.agreeProtocol=!e.loginCheck.agreeProtocol}}},[e.loginCheck.agreeProtocol?e._e():o("img",{staticClass:"check",attrs:{src:i("7a73")}}),e.loginCheck.agreeProtocol?o("img",{staticClass:"check",attrs:{src:i("d202")}}):e._e(),e._v(" "+e._s(e.$t("login.agree"))+"  \n            "),o("span",{staticClass:"protocol pointer",on:{click:function(t){return e.onProtocolHandler()}}},[e._v(e._s(e.$t("login.protocol")))])]),o("div",{staticClass:"login-submit pointer flex-center",class:{disabled:e.otpLoginDisabled},on:{click:function(t){return e.handlerLogin()}}},[e.loading?o("van-loading"):e._e(),o("span",[e._v(e._s(e.$t("login.login")))])],1),o("div",{staticClass:"login-func"},[o("div",{staticClass:"login-func-btn pointer",on:{click:function(t){return e.toRegisterPage()}}},[e._v(e._s(e.$t("login.register")))]),o("div",{staticClass:"login-func-btn pointer",on:{click:function(t){return e.onForgetHandler()}}},[e._v(e._s(e.$t("login.forget")))])])]):e._e(),3==e.type?o("div",{staticClass:"login"},[o("div",{staticClass:"login-tit2"},[e._v(e._s(e.$t("register.title2")))]),o("div",{staticClass:"gird-g form"},[o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:i("7e1c")}}),e._v(" "+e._s(e.$t("register.newPassword"))+"\n              ")]),o("div",{staticClass:"ipt-wrap"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.values.password,expression:"values.password"}],staticClass:"ipt",attrs:{placeholder:e.$t("register.newPasswordPlaceholder"),type:"password"},domProps:{value:e.values.password},on:{input:function(t){t.target.composing||e.$set(e.values,"password",t.target.value)}}})]),e.errorTips.p4.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.p4)+"\n              ")]):e._e()]),o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:i("7e1c")}}),e._v(" "+e._s(e.$t("register.newPasswordSure"))+"\n              ")]),o("div",{staticClass:"ipt-wrap"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.values.passwordRepeat,expression:"values.passwordRepeat"}],staticClass:"ipt",attrs:{placeholder:e.$t("register.newPasswordSurePlaceholder"),type:"password"},domProps:{value:e.values.passwordRepeat},on:{input:function(t){t.target.composing||e.$set(e.values,"passwordRepeat",t.target.value)}}})]),e.errorTips.p5.length>0?o("div",{staticClass:"validator"},[o("img",{attrs:{src:i("b98c"),alt:""}}),e._v(e._s(e.errorTips.p5)+"\n              ")]):e._e()])]),o("div",{staticClass:"login-submit pointer flex-center",class:{disabled:e.submitDisabled},on:{click:function(t){return e.onRegisterHandler()}}},[e.loading?o("van-loading"):e._e(),o("span",[e._v(e._s(e.$t("register.sure")))])],1)]):e._e()])])],1)},s=[],r=(i("5ab2"),i("e10e"),i("f548"),i("cc57"),i("6d57"),i("88d6")),a=(i("edca"),i("0075")),n=i("9660"),l=i("4ec3"),c=i.n(l),d=i("ed0b"),p=i("79c3"),g=i("daf4"),u=i("36de"),m=i("d238"),h=i("7d92"),v=i("fa7d"),f=i("0261");function b(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function C(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?b(Object(i),!0).forEach((function(t){Object(r["a"])(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):b(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}f["default"].use(a["a"]);var _={data:function(){var e;return{loading:!1,key:"value",type:1,values:(e={token:"",deviceId:"",vcodeuuid:""},Object(r["a"])(e,"token",""),Object(r["a"])(e,"deviceId",""),Object(r["a"])(e,"imageBase64",""),Object(r["a"])(e,"password",""),Object(r["a"])(e,"passwordRepeat",""),e),times:{interval:0,remain:0,tip:""},loginForm:{userId:"",password:"",imageValue:"",mobileNo:"",otp:""},loginCheck:{showImageCode:!1,agreeProtocol:!1},errorTips:{e1:"",e2:"",e3:"",e4:"",oe1:"",oe2:"",oe3:"",p4:"",p5:""},mobileTip:{},mobileOptions:[],mobileNoType:"hk",modalVisiable:!1,modalSimpleVisiable:!1,modalUploadCardVisiable:!1,modalProtocolVisiable:!1,targetPath:"",modalIcon:"succ",modalContent:""}},components:{modalComp:p["a"],modalSimpleComp:g["a"],modalProtocolComp:u["a"],modalUploadCardComp:m["a"]},computed:C(C({},Object(n["c"])({userInfo:function(e){return e.userInfo}})),{},{locale:function(){return this.$i18n.locale||"tc"},i18n:function(){return this.$i18n.messages&&this.$i18n.locale?this.$i18n.messages[this.$i18n.locale]:{}},pwdLoginDisabled:function(){var e=!this.loginCheck.agreeProtocol,t=!this.loginForm.userId,i=!this.loginForm.password,o=e||t||i;return o},pwdLoginDisabledOneAccountCenterOff:function(){var e=!this.loginCheck.agreeProtocol,t=!this.loginForm.userId,i=!1,o=!this.loginForm.otp,s=e||t||i||o;if(!s){var r=this.loginForm.userId,a=Object(v["c"])("hkmobile",r),n=Object(v["c"])("mobile",r);s=s||!(a||n)}return s},otpLoginDisabled:function(){var e=!this.loginCheck.agreeProtocol,t=!this.loginForm.mobileNo,i=!Object(v["b"])(this.loginForm.otp),o=!this.values.token,s=this.values.vcodeuuid&&!this.loginForm.imageValue;return e||t||i||o||s},submitDisabled:function(){var e=!(this.values.password&&!this.checkPassword(this.values.password)),t=this.values.passwordRepeat!=this.values.password;return e||t},oneAccountCenterOff:function(){return window.global.oneAccountCenterOff}}),methods:{showModal:function(e,t){t=t&&"undefined"!==typeof t?t:"succ",this.modalIcon=t,this.modalContent=e,"succ"==t?this.modalVisiable=!0:this.modalSimpleVisiable=!0},closeModal:function(){this.modalVisiable=!1,this.modalSimpleVisiable=!1,this.modalProtocolVisiable=!1},onCheckHandler:function(){},onProtocolHandler:function(){this.modalProtocolVisiable=!0},onSubmitHandler:function(){},toRegisterPage:function(){this.$router.push({path:"/register"})},onForgetHandler:function(){this.$router.push({path:"/password/find"})},onLoginTypeHandler:function(e){this.type=e},initData:function(){this.userInfo&&(this.userInfo.sid||this.userInfo.name)&&this.$router.push({path:"/"});var e=JSON.parse(JSON.stringify(this.i18n.register.mobileOptions));this.mobileOptions=e,this.mobileTip=this.mobileOptions[0]},handlerIsShowImageVcode:function(){var e=this;return new Promise((function(t,i){Object(d["c"])({url:c.a.stdIsShowImageVcode,data:{deviceId:e.values.deviceId,userId:e.loginForm.userId}}).then((function(i){e._handlerIsShowImageVcodeResponse(i)&&t(i)}))}))},_handlerIsShowImageVcodeResponse:function(e){if("0"==e.returnCode){if(this.values.token=e.data.token,"N"==e.data.isShowVcode)return!0;this.loginCheck.showImageCode=!0,this.values.vcodeuuid=e.data.vcodeuuid,this.values.imageBase64=e.data.image}return!1},handlerRefreshVcode:function(){},handlerLogin:function(){1==this.type&&this.pwdLoginDisabled||2==this.type&&this.otpLoginDisabled||(this.refreshDeviceId(),this.loginCheck.agreeProtocol?1==this.type?this._passwordLogin():this._otpLogin():this._showAgreeProtocalTips())},userIdLegalCheck:function(){var e=this.loginForm.userId,t=Object(v["c"])("hkmobile",e),i=Object(v["c"])("mobile",e);return!(!t&&!i)||(this._showMobileNoIllegalTip(),!1)},pwdLoginWhenOneAccountCenterOff:function(){var e=this;if(!this.pwdLoginDisabledOneAccountCenterOff&&!this.loading){this.loading=!0;var t={account:this.loginForm.userId,otp:this.loginForm.otp};Object(d["c"])({url:c.a.doLoginV2,data:t}).then((function(t){e.loading=!1,e.$store.commit("SET_USER_INFO",t),e._redirectTo()})).catch((function(t){switch(e.loading=!1,t.code){case 404:e.errorTips.e1=e.i18n.login.tips.e8;break;case 1104:e.errorTips.oe2=e.i18n.login.tips.oe4;break;case 1102:e.errorTips.oe2=e.i18n.login.tips.e6;break;case 1101:e.errorTips.oe2=e.i18n.login.tips.e7;break}}))}},sendOTPWhenOneAccountCenterOff:function(){var e=Object(v["c"])("hkmobile",this.loginForm.userId),t=Object(v["c"])("mobile",this.loginForm.userId);if(e||t){if(!(this.times.remain>0)){var i={mobile:this.loginForm.userId,lan:this.locale};this._startTimeClick(),Object(d["c"])({url:c.a.refreshSmgOtp,data:i}).then((function(e){})).catch((function(e){console.error(e)}))}}else this._showMobileNoIllegalTip()},_passwordLogin:function(){var e=this;this.loginForm.userId?this.loginForm.password?this.loading||(this.loading=!0,this.handlerIsShowImageVcode().then((function(){Object(d["c"])({url:c.a.gsLogin,data:{deviceId:e.values.deviceId,loginName:e.loginForm.userId,loginPwd:Object(h["passwordEncrypt"])(e.loginForm.password)}}).then((function(t){e.loading=!1,e._handlerLoginResponse(t)})).catch((function(t){e.loading=!1}))}))):this._showEmptyPasswordTips():this._showEmptyInputTips()},_handlerLoginResponse:function(e){0==e.returnCode||"0"==e.returnCode?(this.$store.commit("SET_USER_INFO",e.data),this._redirectTo()):this._showLoginErrorMessage(e)},_showEmptyInputTips:function(){var e=this.i18n.login.tips.e1;this.errorTips.e1=e},_showEmptyPasswordTips:function(){var e=this.i18n.login.tips.e2;this.errorTips.e2=e},_showAgreeProtocalTips:function(){this.i18n.login.tips.e4},_showLoginErrorMessage:function(e){switch(e.returnCode){case"SMS_ERROR_006":this.errorTips.oe2=this.i18n.login.tips.oe4;break;case"BIZ_ERROR_018":this.errorTips.e2=this.i18n.login.tips.e5;break;case"BIZ_ERROR_011":case"BIZ_ERROR_012":case"OTP_ERROR_015":return void(this.errorTips.e2=e.returnMsg);case"GS_RESETPWD_ERROR_NOUSERINFO":this.type=3;break;case"COMMON_ERROR_009":this.errorTips.p5=e.returnMsg;break;default:3==this.type?this.errorTips.p5=e.returnMsg:(this.errorTips.e2=this.i18n.login.tips.e5,this.errorTips.oe2=this.i18n.login.tips.e5);break}},_redirectTo:function(){var e=this.$route.query.callback||"/";this.$router.push({path:e})},_otpLogin:function(){var e=this;this._checkOptParams().then((function(){var t={mobileNo:e.loginForm.mobileNo,token:e.values.token,otp:e.loginForm.otp,deviceId:e.refreshDeviceId()};e.loading||(e.loading=!0,Object(d["c"])({url:c.a.otpLogin,data:t}).then((function(t){e.loading=!1,e._handlerLoginResponse(t)})).catch((function(t){e.loading=!1})))}))},_checkOptParams:function(){var e=this;return new Promise((function(t,i){e._checkMobileLegal().then((function(){Object(v["b"])(e.loginForm.otp)?e.values.token?t():e._showGetOptTips():e._showOtpEmptyTips()}))}))},_showGetOptTips:function(){var e=this.i18n.login.tips.oe1;this.errorTips.oe2=e},_showImageValueTip:function(){var e=this.i18n.login.tips.oe2;this.errorTips.oe3=e},_showOtpEmptyTips:function(){var e=this.i18n.login.tips.oe3;this.errorTips.oe2=e},handlerStdSendOTP:function(){var e=this;this._checkMobileLegal().then((function(){e.times.remain>0||(!e.values.vcodeuuid||e.loginForm.imageValue?e._handlerIsShowImageVcode().then((function(){e._startStdSendOTP()})):e._showImageValueTip())}))},handlerRefreshImageValue:function(){var e=this;Object(d["c"])({url:c.a.stdRefreshVcode,data:{vcodeuuid:this.values.vcodeuuid}}).then((function(t){e.values.imageBase64=t.data.image}))},checkPassword:function(e){if(e.length<8)return this.i18n.register.tips.e7;var t=/([a-z])+/.test(e),i=/([A-Z])+/.test(e),o=/([0-9])+/.test(e),s=/[^a-zA-Z0-9]+/.test(e);return(t|i)&o&s?"":this.i18n.register.tips.e8},_checkMobileLegal:function(){var e=this;return new Promise((function(t,i){var o=e.loginForm.mobileNo;if("hk"==e.mobileNoType){if(!Object(v["c"])("hkmobile",o))return void e._showMobileNoIllegalTip()}else if(!Object(v["c"])("mobile",o))return void e._showMobileNoIllegalTip();t(!0)}))},_handlerIsShowImageVcode:function(){var e=this;return new Promise((function(t,i){Object(d["c"])({url:c.a.stdIsShowImageVcode,data:{deviceId:e.values.deviceId,userId:e.loginForm.mobileNo}}).then((function(i){e._handlerIsShowImageVcodeResponse(i)&&t(i)}))}))},_showMobileNoIllegalTip:function(){var e=this.i18n.login.tips.oe0;this.errorTips.oe1=e,this.oneAccountCenterOff&&(this.errorTips.e1=e)},_startStdSendOTP:function(){var e=this,t={mobileNo:this.loginForm.mobileNo,token:this.values.token,signFactor:(new Date).getTime(),scene:"otpLogin",deviceId:this.refreshDeviceId()};this.values.vcodeuuid&&(t["vcodeuuid"]=this.values.vcodeuuid,t["imageValue"]=this.loginForm.imageValue),Object(d["c"])({url:c.a.stdSendOTP,data:t}).then((function(t){switch(t.returnCode){case"0":e._startTimeClick(),e.errorTips.oe2="";break;default:e.errorTips.oe2=t.returnMsg;break}}))},_startTimeClick:function(){this.times.remain=120;var e=this,t=this.$i18n.messages[this.$i18n.locale]||{},i=t.register.coutTips;e.times.tip=i.replace("{second}",e.times.remain),this.times.interval=setInterval((function(){if(e.times.remain<=0)return clearInterval(e.times.interval),e.times.interval=0,void(e.times.remain=0);e.times.remain--,e.times.tip=i.replace("{second}",e.times.remain),e.$set(e,"times",e.times)}),1e3)},refreshDeviceId:function(){return this.values.deviceId||(this.values.deviceId=(Math.random()+"").substring(2)),this.values.deviceId},onRegisterHandler:function(){var e=this,t=this.checkPassword(this.values.password);if(t)this.errorTips.p4=t;else{this.errorTips.p4="";var i={deviceId:this.values.deviceId,token:this.values.token,mobileNo:this.loginForm.mobileNo,loginPwd:Object(h["passwordEncrypt"])(this.values.password)};this.loading=!0,Object(d["c"])({url:c.a.otpRegisterAndLogin,data:i}).then((function(t){e.loading=!1,e._handlerLoginResponse(t)})).catch((function(t){e.loading=!1}))}},modalCallback:function(){this.modalVisiable=!1,this.modalSimpleVisiable=!1,this.modalUploadCardVisiable=!1,this.targetPath&&this.$router.push({path:this.targetPath})},closeCallback:function(){this.modalVisiable=!1,this.modalSimpleVisiable=!1,this.modalUploadCardVisiable=!1}},watch:{mobileNoType:function(){var e=this;this.mobileOptions.forEach((function(t){t.type==e.mobileNoType&&(e.$set(e,"mobileTip",t),console.log(e.mobileTip))})),this.errorTips.oe1="",this.errorTips.oe2="",this.errorTips.oe3=""},type:function(){this.loginCheck.showImageCode=!1},"loginForm.userId":function(){this.errorTips.e1=""},"loginForm.password":function(){this.errorTips.e2=""},"loginForm.mobileNo":function(){this.errorTips.oe1=""},"loginForm.otp":function(){this.errorTips.oe2="",this.loginForm.otp=this.loginForm.otp.replace(/(^\s*)|(\s*$)/g,""),this.loginForm.otp.length>0&&(this.loginForm.otp=this.loginForm.otp.substring(0,6))},"loginForm.imageValue":function(){this.errorTips.oe3=""},"values.password":function(){this.$set(this.errorTips,"p4",this.checkPassword(this.values.password))},"values.passwordRepeat":function(){if(this.values.password!=this.values.passwordRepeat){var e=this.i18n.register.tips.e9;this.errorTips.p5=e}else this.errorTips.p5=""}},mounted:function(){this.initData()},created:function(){var e=this;try{this.$root.eventBus.$off("login")}catch(t){}this.$root.eventBus.$on("login",(function(){e.type=1}))}},w=_,T=(i("366e"),i("4023")),k=Object(T["a"])(w,o,s,!1,null,"06213e07",null);t["default"]=k.exports},e9e4:function(e,t,i){},fb14:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAABGUlEQVQ4jdXUPyjEcRzG8dfx4267IkWkuBsUsjgZbVaj7koZ7BaZ7FajwUJXZpNVKUwof5aTxWi4i6RcGO6bfm6R37nBs3z7Pj29ez716ZOqFnMF7GJMa7rCUoR9jOIa9YSwLkxgLwqwM8wmIWXLFVAr5a8w3hH814TN4qpDx0+p36otwBqeY14vpptyeeSavAJ6Yv8n1FLV4rdcGvcYwCq2MIMTfATIOdaxiQeMZMuVr+1oHjkTGsJQeAdCrhP9wRsMbx+644AIC3jEscb486HJdsgcYAXvOAzeRmh3mi1XXqBWyq9hOFUt5j5whDkJFNvDC0z9j7VpCzDzB6wIUtVi7k7jQNzgLSEsrXH+biMsYgeTLTa8xPInQ187HJGJWfUAAAAASUVORK5CYII="}}]);