12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cb60c420"],{"18b4":function(t,e,n){"use strict";var o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"outSideBox",style:{width:"calc(100% + (".concat(t.borderWidth," * 2))"),height:"calc(100% + (".concat(t.borderWidth," * 2))"),backgroundImage:t.borderColor,borderRadius:t.borderRadius}},[e("div",{staticClass:"inSideBox",style:{width:"calc(100% - (".concat(t.borderWidth," * 2))"),height:"calc(100% - (".concat(t.borderWidth," * 2))"),background:t.backgroundColor,borderRadius:t.borderRadius}},[t._t("default")],2)])},a=[],i={name:"GradientBorder",props:{borderWidth:{type:String,default:"1px"},borderRadius:{type:String,default:"15px"},borderColor:{type:String,default:"linear-gradient(270deg,rgba(50, 226, 226, 1),rgba(59, 89, 248, 1),rgba(255, 153, 145, 1))"},backgroundColor:{type:String,default:"#fff"}},data:function(){return{}}},r=i,s=(n("1c75"),n("2877")),c=Object(s["a"])(r,o,a,!1,null,null,null);e["a"]=c.exports},"1c75":function(t,e,n){"use strict";n("40c9")},"40c9":function(t,e,n){},a8be:function(t,e,n){"use strict";n("d0e7")},d0e7:function(t,e,n){},dd7b:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"login-wrap",on:{click:function(e){t.globalRoamingType=!1}}},[e("div",{staticClass:"login-box"},[t.isBind?t._e():e("span",{staticClass:"login-box-title"},[t._v("GYXQCDZ")]),t.isBind?e("span",{staticClass:"login-box-tips"},[t._v("请绑定手机号")]):t._e(),t.isBind?t._e():e("div",{staticClass:"login-box-switch"},[e("GradientBorder",{attrs:{borderWidth:"1px",borderRadius:"50px"}},[e("div",{staticClass:"login-box-switch-content"},[e("div",{staticClass:"login-box-switch-item gradient-font",class:{select:2==t.params.account_type},on:{click:function(e){return t.changeAccountType(2)}}},[e("span",{class:{"gradient-font":1==t.params.account_type}},[t._v("手机登录")])]),e("div",{staticClass:"login-box-switch-item gradient-font",class:{select:1==t.params.account_type},on:{click:function(e){return t.changeAccountType(1)}}},[e("span",{class:{"gradient-font":2==t.params.account_type}},[t._v("邮箱登录")])])])])],1),2==t.params.account_type?e("div",{staticClass:"login-box-phone"},[e("GradientBorder",{attrs:{borderWidth:"1px",borderRadius:"50px"}},[e("div",{staticClass:"login-box-phone-content"},[e("div",{staticClass:"globalRoaming-select",on:{click:function(e){e.stopPropagation(),t.globalRoamingType=!t.globalRoamingType}}},[e("span",[t._v("+"+t._s(t.params.phone_pre))]),e("img",{style:t.globalRoamingType?"":{transform:"rotate(-90deg)"},attrs:{src:n("f158"),alt:""}}),e("div",{class:t.globalRoamingType?"globalRoaming-option":"globalRoaming-option-hide"},[e("GradientBorder",{attrs:{borderWidth:"1px",borderRadius:"5px"}},[e("div",{staticClass:"globalRoaming-option-box"},t._l(t.globalRoaming,(function(n){return e("div",{staticClass:"globalRoaming-option-item",class:{"globalRoaming-option-item-select":n==t.params.phone_pre},on:{click:function(e){e.stopPropagation(),t.params.phone_pre=n}}},[t._v("\n +"+t._s(n)+"\n ")])})),0)])],1)]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.phone,expression:"phone"}],attrs:{type:"text",placeholder:"请输入您的手机号"},domProps:{value:t.phone},on:{change:function(e){return t.params.account=e.target.value},input:function(e){e.target.composing||(t.phone=e.target.value)}}})])])],1):t._e(),1==t.params.account_type?e("div",{staticClass:"login-box-email"},[e("GradientBorder",{attrs:{borderWidth:"1px",borderRadius:"50px"}},[e("div",{staticClass:"login-box-email-content"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],attrs:{type:"text",placeholder:"请输入您的邮箱号"},domProps:{value:t.email},on:{change:function(e){return t.params.account=e.target.value},input:function(e){e.target.composing||(t.email=e.target.value)}}})])])],1):t._e(),e("div",{staticClass:"login-box-code"},[e("GradientBorder",{attrs:{borderWidth:"1px",borderRadius:"50px"}},[e("div",{staticClass:"login-box-code-content"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.params.code,expression:"params.code"}],attrs:{type:"text",placeholder:"请输入验证码"},domProps:{value:t.params.code},on:{input:function(e){e.target.composing||t.$set(t.params,"code",e.target.value)}}}),e("span",{on:{click:t.sendSms}},[t._v(t._s(t.countDown?t.countDown:"获取验证码"))])])])],1),t.isBind?t._e():e("div",{staticClass:"login-box-agreement"},[e("div",{staticClass:"login-box-agreement-content"},[e("div",{style:t.confirmAgreement?{background:"#2a63f3",border:"1px solid transparent"}:{background:"white",border:"1px solid #979797"},on:{click:function(e){t.confirmAgreement=!t.confirmAgreement}}},[t.confirmAgreement?e("i",{staticClass:"el-icon-check"}):t._e()]),e("span",[t._v("我已阅读并同意"),e("a",{on:{click:function(e){return t.$router.push("/agreement?configKey=agreement")}}},[t._v("《用户协议》")]),t._v("、"),e("a",{on:{click:function(e){return t.$router.push("/agreement?configKey=privacy")}}},[t._v("《隐私政策》")])])])]),e("div",{staticClass:"login-box-button",style:t.isBind?{marginTop:"50px"}:"",on:{click:function(e){t.isBind?t.bindPhone():t.submit()}}},[t._v("\n "+t._s(t.isBind?"立即绑定":"登录")+"\n ")])])])},a=[],i=(n("6d67"),n("18b4")),r=n("325c"),s=n("f523"),c={components:{GradientBorder:i["a"]},data:function(){return{select:"phone",globalRoaming:["86"],globalRoamingType:!1,confirmAgreement:!1,isBind:!1,countDown:0,phone:"",email:"",params:{account_type:2,phone_pre:"86",account:"",code:"",facility_type:6,facility_code:""},loading:!1}},mounted:function(){var t=this;this.getPhonePrefix(),Object(r["e"])().then((function(e){return t.params.facility_code=e}))},methods:{changeAccountType:function(t){this.params.account_type=t,this.params.account=1==t?this.email:this.phone},getPhonePrefix:function(){var t=this;s["e"].getPhonePrefix().then((function(e){t.globalRoaming=e.data.map((function(t){return t.code}))}))},submit:function(){var t=this;if(!this.loading){this.loading=!0;var e=this.params,n=Object(r["h"])(e,[["account",["notNull","请输入账户"]],["code",["notNull","请输入验证码"]]]);return n.length>0?(this.loading=!1,this.$message.error(n[0].errMsg)):this.confirmAgreement?void s["h"].unifiedLogin(e).then((function(e){var n=e.msg,o=e.data;t.params.code="",t.$message.success(n),localStorage.setItem("token",o.token),s["j"].getUserInfo(null,!1),setTimeout((function(){o.phone?t.$router.back():(t.isBind=!0,t.params.account_type=2,t.phone="",t.email="")}),1e3)})).finally((function(){return setTimeout((function(){return t.loading=!1}),1e3)})):(this.loading=!1,this.$message.error("请阅读并同意《用户协议》、《用户隐私》"))}},bindPhone:function(){var t=this;if(!this.loading){this.loading=!0;var e=this.params;e.phone=this.phone;var n=Object(r["h"])(e,[["phone",["notNull","请输入手机号码"]],["code",["notNull","请输入验证码"]]]);if(n.length>0)return this.loading=!1,this.$message.error(n[0].errMsg);s["j"].modifyPhone(e).then((function(e){var n=e.msg;e.data;t.params.code="",t.$message.success(n),setTimeout((function(){t.$router.back()}),1e3)})).finally((function(){return setTimeout((function(){return t.loading=!1}),1e3)}))}},sendSms:function(){var t=this,e=this.params,n=Object(r["h"])(e,[["account",["notNull","请输入账户"]]]);if(n.length>0)return this.$message.error(n[0].errMsg);var o={1:s["e"].emailSms,2:s["e"].sendSms},a={1:{email:e.account},2:{phone:e.account,phone_pre:e.phone_pre}};o[e.account_type](a[e.account_type]).then((function(e){var n=e.msg;t.countDownFn(),t.$message.success(n)}))},countDownFn:function(){var t=this,e=60,n=function n(){0!==e&&(t.countDown=--e,setTimeout((function(){return n()}),1e3))};n()}}},l=c,d=(n("a8be"),n("2877")),u=Object(d["a"])(l,o,a,!1,null,"29eb5880",null);e["default"]=u.exports},f158:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACBSURBVChTYxh8gBFEqKio+P/7988XLIIDMDIybrl79+4GsAYlJaUoILUYiJlAfCzgHxDH3bt3bykziPf+/fvLwsLCz/7//+8D5IINQQL/gKZnABUvAHHAGkDg3bt357BoAisGOmU2lI/QAAJomv6jK8YJlJWVI4D+ioRyBzdgYAAAg1M1cCxcUgIAAAAASUVORK5CYII="}}]);
- //# sourceMappingURL=chunk-cb60c420.b823a8ec.js.map
|