| 1 |
- System.register(["./vendor-legacy-8856a2a6.js","./index-legacy-240e7575.js","./dingtalkHooks-legacy-2bd17433.js"],(function(e,o){"use strict";var n,t,i,s,l=document.createElement("style");return l.textContent=".login-page{width:100vw;height:100vh;padding:10vw;display:flex;justify-content:center;align-items:center;color:#fff;text-align:center;background-color:#3c3c3c}.login-page.is-localhost{justify-content:flex-end;background-image:linear-gradient(125deg,green,#6dd5fa,#2980b9,#e4ffcd);background-size:400%;animation:bganimation 15s infinite}.login-page.is-localhost .com-online-code-login-loading{display:none}.login-page .com-online-code-login-loading{user-select:none}.login-page .com-online-code-login-loading .com-title{font-size:2vw}.login-page .com-online-code-login-loading .el-icon-loading{font-size:7vw}@keyframes bganimation{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}.login-page .login-cont{width:50vw;min-width:400px;max-width:500px}.login-page .login-cont .login-title{text-align:center;line-height:60px;user-select:none;font-size:3em;margin-bottom:20px;white-space:nowrap;background-image:linear-gradient(125deg,red,orange,yellow,green,blue,purple);background-size:400%;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent;animation:loginTitleAni 15s infinite}@keyframes loginTitleAni{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}.login-page .login-cont .el-select{width:100%}.login-page .login-cont .el-form-item__label{color:#fff;user-select:none}.login-page .login-cont .login-buts .el-form-item__content{display:flex}.login-page .login-cont .login-buts .el-form-item__content .el-button{margin:0;flex:1}.login-page .login-cont .login-buts .el-form-item__content .submit-but{flex:1.6;margin-right:20px}.vue-puzzle-vcode .vue-auth-box_{padding:0!important}.vue-puzzle-vcode .vue-auth-box_ .auth-body_{border-radius:0!important}.vue-puzzle-vcode .auth-control_ .range-box{margin-top:0!important;border-radius:0!important}.vue-puzzle-vcode .auth-control_ .range-box .range-btn{border-radius:0!important}.el-message--success{background-color:#e6effc;border-color:#e6effc}.el-message--success .el-message__content,.el-message .el-icon-success{color:#2f5de4}\n",document.head.appendChild(l),{setters:[function(e){n=e.d},function(e){t=e.n,i=e.s},function(e){s=e.g}],execute:function(){var o=n({name:"LoginView",data:function(){return{login_ing:!1,ruleForm:{username:"",password:""},rules:{username:[{required:!0,message:"请输入登录账号",trigger:"blur"},{min:4,max:50,message:"长度在 4 到 20 个字符",trigger:"blur"}],password:[{required:!0,message:"请输入登录密码",trigger:"blur"},{min:4,max:20,message:"长度在 4 到 20 个字符",trigger:"blur"}]}}},computed:{isLocalhost:function(){return i.isLocalhost||location.href.indexOf("localhost")>-1}},methods:{getWWAuthCode:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{var o=location.href.split("?")[1].split("&")[0].split("=")[1];console.log("解析 code:",o),o&&e&&this.handleWWAuthLogin(o)}catch(n){console.log("没有解析到code",n)}},handleWWAuthLogin:function(e){var o=this;console.log("WWAuthCode:",e),this.login_ing=!0,this.$store.dispatch("wwAuthLogin",e).then((function(){o.$message.success("登录成功"),o.$router.push("/")})).catch((function(e){o.$message.error(e.msg)})).finally((function(){setTimeout((function(){return o.login_ing=!1}),500)}))},submitForm:function(e){var o=this;this.$refs[e].validate((function(e){if(!e)return console.log("error submit!!"),!1;o.handleLogin()}))},resetForm:function(e){this.$refs[e].resetFields()},handleLogin:function(){var e=this;this.login_ing=!0,this.$store.dispatch("login",this.ruleForm).then((function(o){e.$message.success("登录成功"),e.$router.push("/")})).catch((function(o){o.data&&e.$message.error(o.data.msg)})).finally((function(){setTimeout((function(){return e.login_ing=!1}),500)}))},handleLoginOut:function(){var e=this;this.exit_loading=!0,this.$store.dispatch("loginOut").then((function(){e.$message.info("退出成功"),e.exit_loading=!1}))}},mounted:function(){if(i.isDD){try{s()}catch(e){console.error("DD授权登录失败:",e)}console.log("DD授权登录")}else this.getWWAuthCode(!0)}});e("default",t(o,(function(){var e=this,o=e._self._c;return e._self._setupProxy,o("div",{staticClass:"login-page",class:{"is-localhost":e.isLocalhost}},[e._m(0),e.isLocalhost?o("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[o("el-form-item",{attrs:{label:"登录账号",prop:"username"}},[o("el-input",{attrs:{type:"username"},model:{value:e.ruleForm.username,callback:function(o){e.$set(e.ruleForm,"username",o)},expression:"ruleForm.username"}},[o("i",{staticClass:"el-icon-s-custom",attrs:{slot:"prefix"},slot:"prefix"})])],1),o("el-form-item",{attrs:{label:"登录密码",prop:"password"}},[o("el-input",{attrs:{type:"password",autocomplete:"off","show-password":""},model:{value:e.ruleForm.password,callback:function(o){e.$set(e.ruleForm,"password",o)},expression:"ruleForm.password"}},[o("i",{staticClass:"el-icon-connection",attrs:{slot:"prefix"},slot:"prefix"})])],1),o("el-form-item",{staticClass:"login-buts"},[o("el-button",{staticClass:"submit-but",attrs:{icon:"el-icon-s-promotion",loading:e.login_ing,type:"primary",round:""},on:{click:function(o){return e.submitForm("ruleForm")}}},[e._v("提交 ")]),o("el-button",{attrs:{icon:"el-icon-refresh",type:"danger",round:""},on:{click:function(o){return e.resetForm("ruleForm")}}},[e._v("重置 ")]),o("el-button",{attrs:{icon:"el-icon-refresh",type:"primary",round:""},on:{click:function(o){return e.getWWAuthCode(!0)}}},[e._v("手动测试授权登录 ")])],1)],1):e._e()],1)}),[function(){var e=this,o=e._self._c;return e._self._setupProxy,o("h1",{staticClass:"com-online-code-login-loading"},[o("i",{staticClass:"el-icon-loading"}),o("h1",{staticClass:"com-title"},[e._v("九号同事")])])}],!1,null,null,null,null).exports)}}}));
|