1 line
43 KiB
JavaScript
1 line
43 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-73a0f3fa"],{1644:function(e,t,o){},"58fb":function(e,t,o){},"62de":function(e,t,o){"use strict";o("8ac4")},7835:function(e,t,o){"use strict";o("1644")},7972:function(e,t,o){"use strict";o("58fb")},"8ac4":function(e,t,o){},"8d00":function(e,t,o){"use strict";o("a321")},"9ed6":function(e,t,o){"use strict";o.r(t);var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticStyle:{height:"100vh",width:"100vw",overflow:"hidden"}},[o("div",{staticClass:"login-container"},[o("div",{staticClass:"loginMain"},[o("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,"auto-complete":"on","label-position":"left"}},[o("div",{staticClass:"title-container"},[o("h3",{staticClass:"title"},[e._v("云物业管理AI运营平台 ")])]),e._v(" "),o("div",[o("el-tabs",{staticClass:"loginTabs",on:{"tab-click":e.loginTypeChange},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[o("el-tab-pane",{attrs:{label:"微信扫码",name:"byWechat"}},[o("div",{staticClass:"wechat-login-container"},[o("div",{staticClass:"qr-code-container"},[e.wechatQrCode&&!e.wechatQrCodeExpired?o("div",{staticClass:"qr-code-wrapper",on:{click:e.refreshWechatQrCode}},[o("img",{staticClass:"qr-code-image",attrs:{src:e.wechatQrCode,alt:"微信扫码登录"}}),e._v(" "),o("div",{staticClass:"qr-code-tip"},[e._v("请使用微信扫描二维码登录")]),e._v(" "),o("div",{staticClass:"qr-code-countdown"},[o("el-statistic",{attrs:{value:e.wechatCountdownSeconds,title:"二维码剩余时间",precision:0,suffix:"秒","value-style":{color:e.wechatCountdownSeconds<=10?"#f56c6c":"#409eff"}}})],1),e._v(" "),o("div",{staticClass:"qr-code-refresh-tip"},[e._v("点击刷新二维码")])]):e.wechatQrCodeExpired?o("div",{staticClass:"qr-code-expired"},[o("i",{staticClass:"el-icon-warning-outline"}),e._v(" "),o("div",{staticClass:"qr-code-expired-tip"},[e._v("二维码已过期")]),e._v(" "),o("el-button",{staticClass:"refresh-btn",attrs:{type:"primary",size:"small"},on:{click:e.refreshWechatQrCode}},[e._v("\n 重新获取二维码\n ")])],1):o("div",{staticClass:"qr-code-loading"},[o("i",{staticClass:"el-icon-loading"}),e._v(" "),o("div",[e._v("正在生成二维码...")])])]),e._v(" "),e.wechatQrCodeExpired?e._e():o("div",{staticClass:"wechat-login-tip"},[o("i",{staticClass:"el-icon-mobile-phone"}),e._v(" "),o("span",[e._v("请使用微信扫描上方二维码完成登录")])])])]),e._v(" "),o("el-tab-pane",{attrs:{label:"验证码",name:"byVerify"}},[o("el-form-item",{attrs:{prop:"username"}},[o("div",{staticClass:"itemSet"},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"mobile"}})],1),e._v(" "),o("el-input",{ref:"username",attrs:{clearable:"",placeholder:"手机号码",name:"username",type:"text",autocomplete:"off"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1)]),e._v(" "),o("div",{staticClass:"verifyContent"},[e.verify?o("el-form-item",{attrs:{prop:"verifycode"}},[o("div",{staticClass:"itemSet"},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"verif"}})],1),e._v(" "),o("el-input",{ref:"verifycode",attrs:{clearable:"",type:"text",maxlength:"4",placeholder:"验证码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}},model:{value:e.loginForm.verifycode,callback:function(t){e.$set(e.loginForm,"verifycode",t)},expression:"loginForm.verifycode"}})],1)]):e._e(),e._v(" "),o("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],staticClass:"verifyBtn",attrs:{plain:"",disabled:e.verifyIng},on:{click:e.getVerify}},[e._v(e._s(e.verifyTitle))])],1),e._v(" "),o("div",{staticStyle:{"font-size":"12px","margin-bottom":"22px"}},[e._v("\n *输入验证码进行登录,仅支持中国大陆手机号码\n ")])],1),e._v(" "),o("el-tab-pane",{attrs:{label:"账号密码",name:"byPwd"}},[o("el-form-item",{attrs:{prop:"username"}},[o("div",{staticClass:"itemSet"},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"user2"}})],1),e._v(" "),o("el-input",{ref:"username",attrs:{clearable:"",placeholder:e.$t("login.username"),name:"username",type:"text",autocomplete:"off"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1)]),e._v(" "),o("el-form-item",{attrs:{prop:"password"}},[o("div",{staticClass:"itemSet"},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"lock2"}})],1),e._v(" "),o("el-input",{key:e.passwordType,ref:"password",attrs:{clearable:"",type:e.passwordType,placeholder:e.$t("login.password"),name:"password",autocomplete:"off"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),e._v(" "),o("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[o("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1)]),e._v(" "),"byPwd"===e.activeName?o("el-form-item",{staticClass:"captcha-form-item",attrs:{prop:"captchaCode"}},[o("div",{staticClass:"itemSet"},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"lock"}})],1),e._v(" "),o("el-input",{ref:"captchaCode",staticStyle:{width:"60%"},attrs:{placeholder:"请输入图形验证码",name:"captchaCode",type:"text",autocomplete:"off",maxlength:"4",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}},model:{value:e.loginForm.captchaCode,callback:function(t){e.$set(e.loginForm,"captchaCode",t)},expression:"loginForm.captchaCode"}}),e._v(" "),o("div",{staticClass:"captcha-container",on:{click:e.refreshCaptcha}},[e.captchaImage?o("img",{staticClass:"captcha-image",attrs:{src:e.captchaImage,alt:"验证码"}}):o("div",{staticClass:"captcha-placeholder"},[e._v("\n 点击获取验证码\n ")])])],1),e._v(" "),o("div",{staticClass:"captcha-tip"},[e._v("验证码不区分大小写")])]):e._e(),e._v(" "),o("div",{staticStyle:{"text-align":"right","margin-bottom":"15px"}},[o("el-button",{attrs:{type:"text"},on:{click:function(t){e.changePasswordShow=!0}}},[e._v("忘记密码")])],1)],1)],1)],1),e._v(" "),o("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],staticClass:"loginBtn",attrs:{loading:e.loading,size:"medium"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e._v("\n "+e._s(e.$t("login.logIn"))+"\n ")])],1)],1),e._v(" "),o("div",{staticClass:"CopyRight"},[e._v("Power by Community Cloud Technology")]),e._v(" "),o("el-dialog",{attrs:{"custom-class":"r2Dialog",title:"选择角色",visible:e.selectRolesDialog,"close-on-click-modal":!1,width:"560px"},on:{"update:visible":function(t){e.selectRolesDialog=t}}},[o("div",{staticClass:"roleWrap"},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.roleDivShow,expression:"roleDivShow"}],staticClass:"roleDiv el-icon-warning"},[e._v("\n 请选择所在的公司及岗位角色\n ")]),e._v(" "),o("ul",{staticClass:"roleTree"},e._l(e.roleList,(function(t){return o("li",{key:t.id},[o("span",[e._v(e._s(t[0].orgName))]),e._v(" "),e._l(t,(function(t,a){return o("ul",{key:a,staticClass:"roleTreeChild"},[o("li",{on:{click:function(o){return e.handleSelectedRole(t)}}},[o("span",{class:{checkColor:t.id===e.selectRole.id}},[e._v(e._s(t.roleName))]),e._v(" "),o("span",{directives:[{name:"show",rawName:"v-show",value:t.id===e.selectRole.id,expression:"childItem.id === selectRole.id"}]},[o("i",{staticClass:"checkColor el-icon-check"})])])])}))],2)})),0),e._v(" "),o("div",{staticClass:"btnWrap"},[o("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],staticClass:"commitDialogBtn",attrs:{disabled:e.btnDisabled},on:{click:function(t){return e.submiLogInInfo()}}},[e._v("确定")])],1)])]),e._v(" "),o("Forget",{attrs:{show:e.forgetShow},on:{callClose:function(t){e.forgetShow=!1}}}),e._v(" "),o("ChangePassword",{attrs:{show:e.changePasswordShow},on:{callClose:function(t){e.changePasswordShow=!1}}})],1),e._v(" "),o("el-dialog",{staticClass:"change-password-dialog",attrs:{title:"密码过于简单,请及时修改密码,有利于账号安全",visible:e.showChangePasswordDialog,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,width:"500px",center:""},on:{"update:visible":function(t){e.showChangePasswordDialog=t}}},[o("el-form",{ref:"changePasswordForm",attrs:{model:e.changePasswordForm,rules:e.changePasswordRules,"label-width":"100px"}},[o("el-form-item",{attrs:{label:"手机号",prop:"mobile"}},[o("el-input",{attrs:{type:"text",clearable:"",placeholder:"请输入手机号",autocomplete:"off",name:"force-change-password-mobile"},model:{value:e.changePasswordForm.mobile,callback:function(t){e.$set(e.changePasswordForm,"mobile",t)},expression:"changePasswordForm.mobile"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"验证码",prop:"smscode"}},[o("div",{staticClass:"code-btn"},[o("el-input",{attrs:{type:"text",maxlength:"4",clearable:"",placeholder:"请输入验证码",autocomplete:"off",name:"force-change-password-smscode"},model:{value:e.changePasswordForm.smscode,callback:function(t){e.$set(e.changePasswordForm,"smscode",t)},expression:"changePasswordForm.smscode"}}),e._v(" "),o("el-button",{attrs:{type:"primary",disabled:e.changePasswordVerifyIng},on:{click:e.getChangePasswordVerify}},[e._v("\n "+e._s(e.changePasswordVerifyTitle)+"\n ")])],1)]),e._v(" "),o("el-form-item",{staticClass:"password-form-item",attrs:{label:"新密码",required:"",prop:"newPassword"}},[o("div",{staticClass:"password-input-wrapper"},[o("el-input",{attrs:{type:"password",clearable:"",placeholder:"请输入新密码","show-password":"",autocomplete:"new-password",name:"force-change-password-new"},model:{value:e.changePasswordForm.newPassword,callback:function(t){e.$set(e.changePasswordForm,"newPassword",t)},expression:"changePasswordForm.newPassword"}}),e._v(" "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},slot:"content"},[o("div",[e._v("密码复杂度要求:")]),e._v(" "),o("div",[e._v("• 至少8位字符")]),e._v(" "),o("div",[e._v("• 包含大写字母 (A-Z)")]),e._v(" "),o("div",[e._v("• 包含小写字母 (a-z)")]),e._v(" "),o("div",[e._v("• 包含数字 (0-9)")]),e._v(" "),o("div",[e._v("• 包含特殊字符 (!@#$%^&*等)")])]),e._v(" "),o("span",{staticClass:"password-tip-icon"},[o("i",{staticClass:"el-icon-question itemcursor"})])])],1)]),e._v(" "),o("el-form-item",{attrs:{label:"确认密码",prop:"confirmNewPassword"}},[o("el-input",{attrs:{type:"password",clearable:"",placeholder:"请确认密码","show-password":"",autocomplete:"new-password",name:"force-change-password-confirm"},model:{value:e.changePasswordForm.confirmNewPassword,callback:function(t){e.$set(e.changePasswordForm,"confirmNewPassword",t)},expression:"changePasswordForm.confirmNewPassword"}})],1)],1),e._v(" "),o("div",{staticClass:"change-password-info"},[o("i",{staticClass:"el-icon-info"}),e._v("\n 修改密码需要验证手机号,验证通过后可设置新密码!\n ")]),e._v(" "),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{loading:e.changePasswordLoading,type:"primary"},on:{click:e.handleChangePassword}},[e._v("\n 确认修改\n ")])],1)],1),e._v(" "),o("el-dialog",{staticClass:"wechat-bind-dialog",attrs:{title:"首次扫码登录需绑定账号密码",visible:e.wechatBindDialog,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,width:"40%",center:""}},[o("el-form",{ref:"wechatBindForm",attrs:{model:e.wechatBindForm,rules:e.loginRules,"label-width":"100px"}},[o("el-form-item",{attrs:{label:"手机号",prop:"username"}},[o("el-input",{attrs:{type:"text",clearable:"",placeholder:"请输入手机号",autocomplete:"off",name:"wechat-bind-username"},model:{value:e.wechatBindForm.username,callback:function(t){e.$set(e.wechatBindForm,"username",t)},expression:"wechatBindForm.username"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"密码",prop:"password"}},[o("el-input",{attrs:{type:"password",clearable:"",placeholder:"请输入密码","show-password":"",autocomplete:"new-password",name:"wechat-bind-password"},model:{value:e.wechatBindForm.password,callback:function(t){e.$set(e.wechatBindForm,"password",t)},expression:"wechatBindForm.password"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"验证码",prop:"captchaCode"}},[o("div",{staticClass:"code-btn"},[o("el-input",{staticStyle:{width:"60%"},attrs:{type:"text",maxlength:"4",clearable:"",placeholder:"请输入图形验证码",autocomplete:"off",name:"wechat-bind-captcha"},model:{value:e.wechatBindForm.captchaCode,callback:function(t){e.$set(e.wechatBindForm,"captchaCode",t)},expression:"wechatBindForm.captchaCode"}}),e._v(" "),o("div",{staticClass:"captcha-container",on:{click:e.refreshWechatBindCaptcha}},[e.wechatBindCaptchaImage?o("img",{staticClass:"captcha-image",attrs:{src:e.wechatBindCaptchaImage,alt:"验证码"}}):o("div",{staticClass:"captcha-placeholder"},[e._v("点击获取验证码")])])],1),e._v(" "),o("div",{staticClass:"captcha-tip"},[e._v("验证码不区分大小写")])])],1),e._v(" "),o("div",{staticClass:"wechat-bind-info"},[o("i",{staticClass:"el-icon-info"}),e._v("\n 首次使用微信扫码登录需要绑定您的账号密码,绑定后可直接使用微信扫码登录!\n ")]),e._v(" "),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{loading:e.wechatBindLoading,type:"primary"},on:{click:e.handleWechatBindLogin}},[e._v("\n 确认绑定\n ")])],1)],1)],1)},s=[],n=o("1131"),i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("el-dialog",{attrs:{title:"忘记密码",visible:e.show,"close-on-click-modal":!1,width:"25%","before-close":e.handleClose},on:{"update:visible":function(t){e.show=t}}},[o("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"110px"}},[o("el-form-item",{attrs:{label:"账号/手机号",prop:"mobile"}},[o("el-input",{attrs:{type:"text",clearable:"",placeholder:"账号/手机号",autocomplete:"off",name:"forget-password-mobile"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"验证码",prop:"smscode"}},[o("div",{staticClass:"code-btn"},[o("el-input",{attrs:{placeholder:"短息验证码",type:"text",maxlength:"4",clearable:"",autocomplete:"off",name:"forget-password-smscode"},model:{value:e.form.smscode,callback:function(t){e.$set(e.form,"smscode",t)},expression:"form.smscode"}}),e._v(" "),o("el-button",{attrs:{type:"primary",disabled:e.verifyIng},on:{click:e.getVerify}},[e._v(e._s(e.verifyTitle))])],1)]),e._v(" "),o("el-form-item",[o("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确认提交")])],1)],1),e._v(" "),o("div",{staticClass:"forget-info"},[o("i",{staticClass:"el-icon-info"}),e._v(" 忘记密码验证通过后将重置密码,重置后的密码为手机号后6位!\n ")])],1)],1)},r=[],c=o("21bf"),l={props:{show:{type:Boolean,default:!1}},data:function(){var e=function(e,t,o){""===t?o(new Error("请输入短信验证码")):o()},t=function(e,t,o){var a=/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;""===t?o(new Error("请输入账号(手机号)")):a.test(t)?o():o(new Error("账号(手机号)输入有误"))};return{timer:null,count:"",verifyTitle:"获取验证码",verifyIng:!1,savekey:"",form:{mobile:"",smscode:""},rules:{mobile:[{required:!0,validator:t,trigger:"blur"}],smscode:[{required:!0,validator:e,trigger:"blur"}]}}},watch:{show:function(e){var t=this;e&&this.$nextTick((function(){t.form={mobile:"",smscode:""}}))}},mounted:function(){},methods:{getVerify:function(){var e=this,t=/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;if(!this.form.mobile)return this.$message("请输入账号/手机号"),!1;if(!t.test(this.form.mobile))return this.$message("账号/手机号输入有误"),!1;var o="code".concat(Date.now()).concat(this.form.mobile),a={key:o,mobile:this.form.mobile,type:1};Object(c["b"])(a).then((function(t){0==t.code&&(e.$message({message:"短信发送成功,请查看!",type:"success"}),e.savekey=o,e.codeTime())}))},codeTime:function(){var e=this,t=60;this.count=t,this.verifyIng=!0,this.verifyTitle="".concat(this.count,"秒后再次获取"),this.timer||(this.timer=setInterval((function(){e.count>1&&e.count<=t?(e.count--,e.verifyTitle="".concat(e.count,"秒后再次获取")):(e.verifyIng=!1,clearInterval(e.timer),e.timer=null,e.verifyTitle="获取验证码")}),1e3))},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(t){e.form.mobile;var o={mobile:e.form.mobile,smscode:e.form.smscode,newPassword:e.getLastSixChars(e.form.mobile),key:e.savekey};Object(c["j"])(o).then((function(t){e.$message({type:"success",message:"密码重置成功"}),e.handleClose()}))}}))},getLastSixChars:function(e){return e.slice(-6)},handleClose:function(){this.$refs["form"].resetFields(),this.verifyIng=!1,clearInterval(this.timer),this.timer=null,this.verifyTitle="获取验证码",this.$emit("callClose")}}},d=l,h=(o("62de"),o("829d")),m=Object(h["a"])(d,i,r,!1,null,"122c312d",null),u=m.exports,f=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("el-dialog",{attrs:{title:"修改密码",visible:e.show,"close-on-click-modal":!1,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.show=t}}},[o("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[o("el-form-item",{attrs:{label:"手机号",prop:"mobile"}},[o("el-input",{attrs:{type:"text",clearable:"",placeholder:"请输入手机号",autocomplete:"off",name:"change-password-mobile"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"验证码",prop:"smscode"}},[o("div",{staticClass:"code-btn"},[o("el-input",{attrs:{type:"text",maxlength:"4",clearable:"",placeholder:"请输入验证码",autocomplete:"off",name:"change-password-smscode"},model:{value:e.form.smscode,callback:function(t){e.$set(e.form,"smscode",t)},expression:"form.smscode"}}),e._v(" "),o("el-button",{attrs:{type:"primary",disabled:e.verifyIng},on:{click:e.getVerify}},[e._v(e._s(e.verifyTitle))])],1)]),e._v(" "),o("el-form-item",{attrs:{label:"新密码",prop:"newPassword"}},[o("div",{staticClass:"password-input-row"},[o("el-input",{attrs:{type:"password",clearable:"",placeholder:"请输入新密码","show-password":"",autocomplete:"new-password",name:"change-password-new"},model:{value:e.form.newPassword,callback:function(t){e.$set(e.form,"newPassword",t)},expression:"form.newPassword"}}),e._v(" "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},slot:"content"},[o("div",[o("div",[e._v("密码复杂度要求:")]),e._v(" "),o("div",[e._v("• 至少8位字符")]),e._v(" "),o("div",[e._v("• 包含大写字母 (A-Z)")]),e._v(" "),o("div",[e._v("• 包含小写字母 (a-z)")]),e._v(" "),o("div",[e._v("• 包含数字 (0-9)")]),e._v(" "),o("div",[e._v("• 包含特殊字符 (!@#$%^&*等)")])])]),e._v(" "),o("span",[o("i",{staticClass:"el-icon-question itemcursor"})])])],1)]),e._v(" "),o("el-form-item",{attrs:{label:"确认密码",prop:"confirmNewPassword"}},[o("el-input",{attrs:{type:"password",clearable:"",placeholder:"请确认密码","show-password":"",autocomplete:"new-password",name:"change-password-confirm"},model:{value:e.form.confirmNewPassword,callback:function(t){e.$set(e.form,"confirmNewPassword",t)},expression:"form.confirmNewPassword"}})],1),e._v(" "),o("el-form-item",[o("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确认修改")])],1)],1),e._v(" "),o("div",{staticClass:"change-password-info"},[o("i",{staticClass:"el-icon-info"}),e._v("\n 修改密码需要验证手机号,验证通过后可设置新密码!\n ")])],1)],1)},g=[],p={props:{show:{type:Boolean,default:!1}},data:function(){var e=this,t=function(e,t,o){var a=/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;""===t?o(new Error("请输入手机号")):a.test(t)?o():o(new Error("手机号格式不正确"))},o=function(e,t,o){""===t?o(new Error("请输入验证码")):o()},a=function(e,t,o){""===t?o(new Error("请输入新密码")):t.length<8?o(new Error("密码长度至少8位")):/(?=.*[a-z])/.test(t)?/(?=.*[A-Z])/.test(t)?/(?=.*\d)/.test(t)?/(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])/.test(t)?o():o(new Error("密码必须包含特殊字符")):o(new Error("密码必须包含数字")):o(new Error("密码必须包含大写字母")):o(new Error("密码必须包含小写字母"))},s=function(t,o,a){""===o?a(new Error("请再次输入密码")):o!==e.form.newPassword?a(new Error("两次输入密码不一致!")):o.length<8?a(new Error("密码长度至少8位")):/(?=.*[a-z])/.test(o)?/(?=.*[A-Z])/.test(o)?/(?=.*\d)/.test(o)?/(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])/.test(o)?a():a(new Error("密码必须包含特殊字符")):a(new Error("密码必须包含数字")):a(new Error("密码必须包含大写字母")):a(new Error("密码必须包含小写字母"))};return{timer:null,count:"",verifyTitle:"获取验证码",verifyIng:!1,savekey:"",form:{mobile:"",newPassword:"",confirmNewPassword:"",smscode:""},rules:{mobile:[{required:!0,validator:t,trigger:"blur"}],smscode:[{validator:o,trigger:"blur"}],newPassword:[{validator:a,trigger:"blur"}],confirmNewPassword:[{validator:s,trigger:"blur"}]}}},watch:{show:function(e){var t=this;e&&this.$nextTick((function(){t.form={mobile:"",newPassword:"",confirmNewPassword:"",smscode:""}}))}},methods:{maskPhoneNumber:function(e){return e?e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2"):""},getVerify:function(){var e=this;if(this.form.mobile){var t="code".concat(Date.now()).concat(this.form.mobile),o={key:t,mobile:this.form.mobile,type:1};Object(c["b"])(o).then((function(o){0==o.code&&(e.$message({message:"短信发送成功,请查看!",type:"success"}),e.savekey=t,e.codeTime())}))}else this.$message({message:"请先输入手机号",type:"error"})},codeTime:function(){var e=this,t=60;this.count=t,this.verifyIng=!0,this.verifyTitle="".concat(this.count,"秒后再次获取"),this.timer||(this.timer=setInterval((function(){e.count>1&&e.count<=t?(e.count--,e.verifyTitle="".concat(e.count,"秒后再次获取")):(e.verifyIng=!1,clearInterval(e.timer),e.timer=null,e.verifyTitle="获取验证码")}),1e3))},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(t){var o={mobile:e.form.mobile,smscode:e.form.smscode,newPassword:e.form.confirmNewPassword,key:e.savekey};Object(c["j"])(o).then((function(t){e.$message({type:"success",message:"密码修改成功!"}),e.handleClose()}))}}))},psdSafety:function(){this.$alert('\n <div style="text-align: left; line-height: 1.6;">\n <h4>密码安全策略</h4>\n <p><strong>密码复杂度要求:</strong></p>\n <ul>\n <li>至少8位字符</li>\n <li>包含大写字母 (A-Z)</li>\n <li>包含小写字母 (a-z)</li>\n <li>包含数字 (0-9)</li>\n <li>包含特殊字符 (!@#$%^&*等)</li>\n </ul>\n <p><strong>安全建议:</strong></p>\n <ul>\n <li>不要使用个人信息作为密码</li>\n <li>定期更换密码</li>\n <li>不要在多个账户使用相同密码</li>\n <li>避免使用常见密码模式</li>\n </ul>\n </div>\n ',"密码安全策略",{dangerouslyUseHTMLString:!0,confirmButtonText:"我知道了"})},handleClose:function(){this.$refs["form"].resetFields(),this.verifyIng=!1,clearInterval(this.timer),this.timer=null,this.verifyTitle="获取验证码",this.$emit("callClose")}}},w=p,v=(o("7972"),Object(h["a"])(w,f,g,!1,null,"976a27a0",null)),b=v.exports,y=o("8c92"),C=o.n(y),I=o("c24f"),P=o("2b74"),_=o("ed08");function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function k(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function $(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach((function(t){F(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function F(e,t,o){return(t=T(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function T(e){var t=S(e,"string");return"symbol"==x(t)?t:t+""}function S(e,t){if("object"!=x(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var a=o.call(e,t||"default");if("object"!=x(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var B={name:"Login",components:{LangSelect:n["a"],Forget:u,ChangePassword:b},data:function(){var e=this,t=function(e,t,o){t?o():o(new Error("请输入登录账号/手机号"))},o=function(e,t,o){t.length<6?o(new Error("登录密码为6位及以上")):o()},a=function(e,t,o){t?4!=t.length?o(new Error("验证码为4位数")):o():o(new Error("请输入验证码"))},s=function(t,o,a){"byPwd"===e.activeName?o?o.length<4?a(new Error("图形验证码为4位")):a():a(new Error("请输入图形验证码")):a()},n=function(e){var t=/[A-Z]/.test(e),o=/[a-z]/.test(e),a=/\d/.test(e),s=/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(e);return t&&o&&a&&s},i=function(e,t,o){""===t?o(new Error("请输入新密码")):t.length<8?o(new Error("密码长度至少8位")):n(t)?o():o(new Error("密码必须包含大小写字母、数字和特殊字符"))},r=function(t,o,a){""===o?a(new Error("请再次输入密码")):o!==e.changePasswordForm.newPassword?a(new Error("两次输入密码不一致!")):o.length<8?a(new Error("密码长度至少8位")):n(o)?a():a(new Error("密码必须包含大小写字母、数字和特殊字符"))};return{selectRolesDialog:!1,verify:!1,verifyIng:!1,roleDivShow:!1,btnDisabled:!1,activeName:"byWechat",timer:null,count:"",verifyTitle:"获取验证码",loginForm:{username:"",password:"",verifycode:"",captchaCode:"",captchaUuid:""},logInRules:{},loginRules:{username:[{required:!0,validator:t}],password:[{required:!0,validator:o}],verifycode:[{required:!0,validator:a}],captchaCode:[{validator:s}]},passwordType:"password",loading:!1,showDialog:!1,redirect:void 0,roleList:[],roleContrast:[],selectRole:"",logInInfo:{},companyList:[],forgetShow:!1,changePasswordShow:!1,captchaImage:"",loginSubmitting:!1,showChangePasswordDialog:!1,changePasswordLoading:!1,loginUserInfo:null,changePasswordForm:{mobile:"",smscode:"",newPassword:"",confirmNewPassword:""},changePasswordRules:{mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,message:"手机号格式不正确",trigger:"blur"}],smscode:[{required:!0,message:"请输入验证码",trigger:"blur"}],newPassword:[{required:!0,trigger:"blur",validator:i}],confirmNewPassword:[{required:!0,trigger:"blur",validator:r}]},changePasswordVerifyIng:!1,changePasswordVerifyTitle:"获取验证码",changePasswordTimer:null,changePasswordCount:0,changePasswordSavekey:"",savedRoleInfo:null,wechatQrCode:"",wechatQrCodeExpired:!1,wechatPollingTimer:null,wechatPollingStartTime:null,wechatTimeoutTimer:null,wechatCountdownTimer:null,wechatCountdownSeconds:60,wechatBindDialog:!1,wechatBindForm:{username:"",password:"",captchaCode:"",captchaUuid:"",openid:""},wechatBindLoading:!1,wechatBindCaptchaImage:""}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0},wechatBindDialog:function(e){var t=this;e&&this.$nextTick((function(){t.wechatBindForm={username:"",password:"",captchaCode:"",captchaUuid:t.generateUUID(),openid:t.wechatBindForm.openid},t.getWechatBindCaptcha()}))},showChangePasswordDialog:function(e){var t=this;e&&this.$nextTick((function(){var e=t.changePasswordForm.mobile;t.changePasswordForm={mobile:e,smscode:"",newPassword:"",confirmNewPassword:""}}))}},created:function(){C.a.remove("CToken"),this.loginForm.captchaUuid=this.generateUUID(),this.getCaptcha(),this.initWechatLogin()},mounted:function(){""===this.loginForm.username?this.$refs.username.focus():""===this.loginForm.password?this.$refs.password.focus():""===this.loginForm.veritycode&&this.$refs.veritycode.focus()},destroyed:function(){this.clearWechatPolling()},methods:{generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,o="x"===e?t:3&t|8;return o.toString(16)}))},getCaptcha:function(){var e=this;Object(I["a"])({captchaUuid:this.loginForm.captchaUuid}).then((function(t){t&&0===t.code?e.captchaImage="data:image/png;base64,".concat(t.data):e.$message.error("获取验证码失败")})).catch((function(t){console.error("获取验证码失败:",t),e.$message.error("获取验证码失败")}))},refreshCaptcha:function(){this.loginForm.captchaUuid=this.generateUUID(),this.loginForm.captchaCode="",this.getCaptcha()},groupArr:function(e,t){var o={};return e.forEach((function(e){var a=JSON.stringify(t(e));o[a]=o[a]||[],o[a].push(e)})),Object.keys(o).map((function(e){return o[e]}))},handleSelectedRole:function(e){this.selectRole=e,this.selectRole.roleId&&(this.btnDisabled=!1,this.roleDivShow=!1,3===this.logInInfo.type&&this.selectRole.accountName&&(this.logInInfo.username=this.selectRole.accountName))},findByAccountId:function(){var e=this;this.wechatBindLoading=!1;this.roleList=[],this.loading=!0,3==this.logInInfo.type||this.logInInfo.accountName||(this.logInInfo.accountName=this.loginForm.username),Object(c["c"])(this.logInInfo).then((function(t){if(0===t.code){var o=t.data;if(o.length>1){e.loading=!1,e.selectRolesDialog=!0;var a=e.groupArr(o,(function(e){return[e.orgId]}));e.roleList=a}else 1===o.length&&(e.loading=!1,e.selectRole=o[0],3===e.logInInfo.type&&e.selectRole.accountName&&(e.logInInfo.username=e.selectRole.accountName),e.submiLogInInfo())}else 999==t.code&&(e.loading=!1,e.wechatBindForm.openid=e.logInInfo.openid,e.wechatBindForm.captchaUuid=e.generateUUID(),e.getWechatBindCaptcha(),e.wechatBindDialog=!0)})).catch((function(t){console.log("findByAccountId error:",t),e.loading=!1}))},unique:function(e){var t=new Map;return e.filter((function(e){return!t.has(e.roleId)&&t.set(e.roleId,1)}))},loginTypeChange:function(e){this.activeName=e.name,"byVerify"==this.activeName?this.verify=!0:this.verify=!1,"byWechat"==this.activeName?this.initWechatLogin():this.clearWechatLogin()},getVerify:function(){var e=this,t={mobile:this.loginForm.username,type:1};Object(c["k"])(t).then((function(t){0==t.code&&(e.$message({message:"短信发送成功,请查看!",type:"success"}),e.codeTime())}))},codeTime:function(){var e=this,t=60;this.count=t,this.verifyIng=!0,this.verifyTitle="".concat(this.count,"秒后再次获取"),this.timer||(this.timer=setInterval((function(){e.count>1&&e.count<=t?(e.count--,e.verifyTitle="".concat(e.count,"秒后再次获取")):(e.verifyIng=!1,clearInterval(e.timer),e.timer=null,e.verifyTitle="获取验证码")}),1e3))},submiLogInInfo:function(){this.btnDisabled=!0,this.selectRole&&this.selectRole.roleId?(this.logInInfo.orgId=this.selectRole.orgId,this.logInInfo.memberId=this.selectRole.memberId,this.logInInfo.roleId=this.selectRole.roleId,3===this.logInInfo.type&&this.selectRole.accountName&&(this.logInInfo.username=this.selectRole.accountName),this.getProjectList()):this.roleDivShow=!0},getProjectList:function(){var e=this,t={id:this.logInInfo.roleId};Object(P["n"])(t).then((function(t){if(0===t.code&&t.data&&t.data.length){var o=t.data,a=o.find((function(e){return e.isHaveEquity}));a||(a=o[0]),localStorage.setItem("companyName",a.companyName),e.$store.commit("setState",{id:a.id,star:a.star,companyUuid:a.companyUuid,companyId:a.companyId,community_uuid:a.uuid,community_name:a.name,codeNumber:a.codeNumber}),e.$store.dispatch("user/login",e.logInInfo).then((function(t){console.log(t,"login+++++++++++++"),e.loading=!1,e.loginUserInfo=t,t.needChangePassword?(e.selectRolesDialog=!1,e.savedRoleInfo={orgId:e.selectRole.orgId,memberId:e.selectRole.memberId,roleId:e.selectRole.roleId},e.selectRole={},e.changePasswordForm.mobile=e.loginForm.username,e.showChangePasswordDialog=!0):t.needPasswordReminder?e.$alert("检测到您的密码长时间未修改?","提示",{confirmButtonText:"我已知悉",showClose:!1,closeOnClickModal:!1,closeOnPressEscape:!1}).then((function(){e.completeLogin()})):(e.selectRolesDialog=!1,e.$store.dispatch("user/getInfo").then((function(){e.getCompanyList(),e.checkPwd()})))})).catch((function(){e.loading=!1,e.btnDisabled=!1}))}else e.$store.dispatch("user/login",e.logInInfo).then((function(t){console.log(t,"login+++++++++++++"),e.loading=!1,e.loginUserInfo=t,t.needChangePassword?(e.selectRolesDialog=!1,e.savedRoleInfo={orgId:e.selectRole.orgId,memberId:e.selectRole.memberId,roleId:e.selectRole.roleId},e.selectRole={},e.showChangePasswordDialog=!0):t.needPasswordReminder?e.$alert("检测到您的密码长时间未修改?","提示",{confirmButtonText:"我已知悉",showClose:!1,closeOnClickModal:!1,closeOnPressEscape:!1}).then((function(){e.completeLogin()})):(e.selectRolesDialog=!1,e.$store.dispatch("user/getInfo").then((function(){e.getCompanyList(),e.checkPwd()})))})).catch((function(){e.loading=!1,e.btnDisabled=!1}))}))},checkPwd:function(){if("byPwd"==this.activeName){var e=this.loginForm.username,t=this.loginForm.password;e.slice(-6)==t?sessionStorage.setItem("dangerPwd",!0):sessionStorage.removeItem("dangerPwd")}},completeLogin:function(){var e=this;this.selectRolesDialog=!1,this.$store.dispatch("user/getInfo").then((function(){e.getCompanyList(),e.checkPwd()})).catch((function(t){console.error("获取用户信息失败:",t),e.$message.error("获取用户信息失败,请重试")}))},getCompanyList:function(){var e=this,t=JSON.parse(window.localStorage.getItem("C_userInfo"));Object(P["o"])({accountName:this.logInInfo.accountName,roleId:t.roleId,memberId:t.memberId,orgId:t.orgId}).then((function(t){t.data&&t.data.menuSelectAllResponseDTOS.length>0?(e.companyList=[t.data.companyAuthApplyOrderRespDTO],e.toCompany()):(e.companyList=[],e.btnDisabled=!1,e.$router.push({path:e.redirect||"/"}),e.selectRolesDialog=!1)}))},toCompany:function(){var e=JSON.parse(window.localStorage.getItem("C_userInfo"));if(0!=this.companyList.length){var t={phone:this.companyList[0].phoneNumber,companyName:this.companyList[0].fullName,companyId:this.selectRole.orgId,logo:this.companyList[0].logo||"",roleId:e.roleId,memberId:e.memberId},o=Object(_["e"])(t),a="".concat("https://hc-etms.sqygj.cn/","#/login");window.location.href="".concat(a,"?").concat(o)}},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))},handleLogin:function(){var e=this;if(localStorage.clear(),"byPwd"===this.activeName){var t=this.loginForm,o=t.username,a=t.password,s=t.captchaCode,n=t.captchaUuid;if(!o)return this.$message.error("请输入登录账号/手机号");if(!a||a.length<6)return this.$message.error("登录密码为6位及以上");if(!s||s.length<4)return this.$message.error("请输入4位图形验证码");if(this.loginSubmitting)return;this.loginSubmitting=!0;var i={type:1,username:o,password:a,captchaCode:s,captchaUuid:n};this.logInInfo=i,this.findByAccountId(),this.$nextTick((function(){return e.loginSubmitting=!1}))}else if("byVerify"===this.activeName){var r=this.loginForm,c=r.username,l=r.verifycode;if(!c)return this.$message.error("请输入登录账号/手机号");if(!l)return this.$message.error("请输入验证码");if(4!==String(l).length)return this.$message.error("验证码为4位数");if(this.loginSubmitting)return;this.loginSubmitting=!0;var d={type:2,username:c,smscode:l};this.logInInfo=d,this.findByAccountId(),this.$nextTick((function(){return e.loginSubmitting=!1}))}else this.activeName},getChangePasswordVerify:function(){var e=this,t="code".concat(Date.now()).concat(this.changePasswordForm.mobile),o={key:t,mobile:this.changePasswordForm.mobile,type:1};Object(c["b"])(o).then((function(o){0==o.code&&(e.$message({message:"短信发送成功,请查看!",type:"success"}),e.changePasswordSavekey=t,e.changePasswordCodeTime())}))},changePasswordCodeTime:function(){var e=this,t=60;this.changePasswordCount=t,this.changePasswordVerifyIng=!0,this.changePasswordVerifyTitle="".concat(this.changePasswordCount,"秒后再次获取"),this.changePasswordTimer||(this.changePasswordTimer=setInterval((function(){e.changePasswordCount>1&&e.changePasswordCount<=t?(e.changePasswordCount--,e.changePasswordVerifyTitle="".concat(e.changePasswordCount,"秒后再次获取")):(e.changePasswordVerifyIng=!1,clearInterval(e.changePasswordTimer),e.changePasswordTimer=null,e.changePasswordVerifyTitle="获取验证码")}),1e3))},handleChangePassword:function(){var e=this;if(!this.$refs.changePasswordForm)return console.error("修改密码表单不存在"),void this.$message.error("表单未初始化,请重试");try{this.$refs.changePasswordForm.validate((function(t){if(!t)return console.log("error submit!!"),!1;e.changePasswordLoading=!0;var o={mobile:e.changePasswordForm.mobile,smscode:e.changePasswordForm.smscode,newPassword:e.changePasswordForm.confirmNewPassword,key:e.changePasswordSavekey};Object(c["j"])(o).then((function(t){e.changePasswordLoading=!1,0==t.code?(e.showChangePasswordDialog=!1,e.$refs.changePasswordForm.resetFields(),e.$message.success("密码修改成功,正在自动登录..."),e.autoLoginAfterPasswordChange()):e.$message.error(t.message||"密码修改失败")})).catch((function(t){e.changePasswordLoading=!1,e.$message.error("密码修改失败"),console.error("修改密码失败:",t)}))}))}catch(t){this.changePasswordLoading=!1,console.error("表单校验失败:",t),this.$message.error("表单校验失败,请检查表单信息")}},autoLoginAfterPasswordChange:function(){if(this.loginUserInfo&&this.savedRoleInfo){var e=$($({},this.loginUserInfo),{},{memberId:this.savedRoleInfo.memberId,roleId:this.savedRoleInfo.roleId,orgId:this.savedRoleInfo.orgId,username:this.loginForm.username,password:this.changePasswordForm.confirmNewPassword,type:1,captchaCode:"",captchaUuid:""});this.logInInfo=e,this.selectRole=this.savedRoleInfo,this.getProjectList()}else this.$message.error("登录信息已丢失,请重新登录")},initWechatLogin:function(){this.wechatQrCodeExpired=!1,this.wechatQrCode="",this.wechatCountdownSeconds=60,this.getWechatQrCode()},getWechatQrCode:function(){var e=this;Object(I["b"])().then((function(t){if(t&&0===t.code){var o=JSON.parse(t.data),a=o.ticket;a?(e.getWechatQrCodeImage(a),e.startWechatPolling(),e.startWechatCountdown()):e.$message.error("获取微信登录ticket失败")}else e.$message.error("获取微信登录二维码失败")})).catch((function(t){console.error("获取微信登录二维码失败:",t),e.$message.error("获取微信登录二维码失败")}))},getWechatQrCodeImage:function(e){var t="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=".concat(encodeURIComponent(e));this.wechatQrCode=t},refreshWechatQrCode:function(){this.clearWechatPolling(),this.initWechatLogin()},startWechatPolling:function(){var e=this;this.clearWechatPolling(),this.wechatPollingStartTime=Date.now(),this.wechatPollingTimer=setInterval((function(){e.checkWechatLoginStatus()}),2e3),this.wechatTimeoutTimer=setTimeout((function(){e.handleWechatPollingTimeout()}),6e4)},startWechatCountdown:function(){var e=this;this.clearWechatCountdown(),this.wechatCountdownSeconds=60,this.wechatCountdownTimer=setInterval((function(){e.wechatCountdownSeconds--,e.wechatCountdownSeconds<=0&&e.clearWechatCountdown()}),1e3)},clearWechatCountdown:function(){this.wechatCountdownTimer&&(clearInterval(this.wechatCountdownTimer),this.wechatCountdownTimer=null)},checkWechatLoginStatus:function(){var e=this;Object(I["c"])({ticket:this.getTicketFromQrCode()}).then((function(t){0==t.code&&("1"==t.data||(null===t.data?(e.clearWechatPolling(),e.$message.warning("二维码已过期,请刷新后重新扫码")):(e.clearWechatPolling(),e.handleWechatLoginSuccess(t.data))))})).catch((function(t){console.error("检查微信登录状态失败:",t),e.clearWechatPolling()}))},getWechatBindCaptcha:function(){var e=this;Object(I["a"])({captchaUuid:this.wechatBindForm.captchaUuid}).then((function(t){t&&0===t.code?e.wechatBindCaptchaImage="data:image/png;base64,".concat(t.data):e.$message.error("获取验证码失败")})).catch((function(t){console.error("获取验证码失败:",t),e.$message.error("获取验证码失败")}))},refreshWechatBindCaptcha:function(){this.wechatBindForm.captchaUuid=this.generateUUID(),this.wechatBindForm.captchaCode="",this.getWechatBindCaptcha()},handleWechatBindLogin:function(){var e=this;if(!this.$refs.wechatBindForm)return console.error("微信绑定表单不存在"),void this.$message.error("表单未初始化,请重试");try{this.$refs.wechatBindForm.validate((function(t){if(!t)return e.wechatBindLoading=!1,console.log("验证失败"),!1;e.wechatBindLoading=!0;var o={type:1,username:e.wechatBindForm.username,password:e.wechatBindForm.password,captchaCode:e.wechatBindForm.captchaCode,captchaUuid:e.wechatBindForm.captchaUuid,openid:e.wechatBindForm.openid,accountName:e.wechatBindForm.username};e.logInInfo=o,e.wechatBindDialog=!1,e.findByAccountId()}))}catch(t){this.wechatBindLoading=!1,console.error("微信绑定登录失败:",t),this.$message.error("表单校验失败,请检查表单信息")}},handleWechatPollingTimeout:function(){console.log("微信登录二维码已超时,需要手动刷新"),this.$message.warning("二维码已过期,请点击刷新按钮重新获取"),this.clearWechatPolling(),this.wechatQrCode="",this.wechatQrCodeExpired=!0},getTicketFromQrCode:function(){if(this.wechatQrCode){var e=new URL(this.wechatQrCode);return e.searchParams.get("ticket")}return null},handleWechatLoginSuccess:function(e){this.loading=!0;var t={type:3,openid:e};this.logInInfo=t,this.findByAccountId()},clearWechatLogin:function(){this.wechatQrCode="",this.wechatQrCodeExpired=!1,this.wechatCountdownSeconds=60,this.clearWechatPolling(),this.clearWechatCountdown()},clearWechatPolling:function(){this.wechatPollingTimer&&(clearInterval(this.wechatPollingTimer),this.wechatPollingTimer=null),this.wechatTimeoutTimer&&(clearTimeout(this.wechatTimeoutTimer),this.wechatTimeoutTimer=null),this.wechatPollingStartTime=null}}},N=B,L=(o("8d00"),o("7835"),o("ce3d"),Object(h["a"])(N,a,s,!1,null,"51b6a756",null));t["default"]=L.exports},a0b6:function(e,t,o){},a321:function(e,t,o){},ce3d:function(e,t,o){"use strict";o("a0b6")}}]); |