Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-915d7660.d666ac63.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
4.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-915d7660"],{c985:function(e,t,s){},ed06:function(e,t,s){"use strict";s("c985")},f140:function(e,t,s){"use strict";s.r(t);var o=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"ny-body ny-zsy"},[e._m(0),t("div",{staticClass:"right"},[t("div",{staticClass:"form-box"},[t("h3",[e._v(e._s(e.$t("login.title")))]),t("div",{staticClass:"bind"},[t("a",{staticClass:"blue",attrs:{href:"javascript:void(0);"},on:{click:e.handleRegister}},[e._v(e._s(e.$t("login.register")))])]),t("el-form",{ref:"loginForm",attrs:{model:e.loginInfo}},[t("el-form-item",{attrs:{prop:"username"}},[t("div",{staticClass:"input-box input-box1 onfocusstyle user-word"},[t("label",{staticClass:"icon-user",attrs:{for:"loginname"}}),t("el-input",{staticClass:"position-input",attrs:{id:"loginname",placeholder:e.$t("login.usernamePlaceholder"),maxlength:"20",autocomplete:"off"},model:{value:e.loginInfo.username,callback:function(t){e.$set(e.loginInfo,"username",t)},expression:"loginInfo.username"}}),t("div",{staticClass:"Validform_checktip formtip"},[t("span",{},[t("i"),t("label")])])],1)]),t("el-form-item",{attrs:{prop:"passwd"}},[t("div",{staticClass:"input-box onfocusstyle passw-word"},[t("label",{staticClass:"icon-passw",attrs:{for:"passw"}}),t("el-input",{staticClass:"position-input",attrs:{type:"password",id:"passw",placeholder:e.$t("login.passwordPlaceholder"),maxlength:"20",autocomplete:"off"},model:{value:e.loginInfo.passwd,callback:function(t){e.$set(e.loginInfo,"passwd",t)},expression:"loginInfo.passwd"}}),t("div",{staticClass:"Validform_checktip formtip"},[t("span",{},[t("i"),t("label")])])],1)]),t("el-form-item",{attrs:{prop:"validateCode"}},[t("div",{staticClass:"input-box onfocusstyle yanm-div"},[t("label",{staticClass:"icon-passw",attrs:{for:"authcode"}}),t("el-input",{staticClass:"position-input",attrs:{maxlength:"4",id:"authcode",placeholder:e.$t("login.codePlaceholder")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin.apply(null,arguments)}},model:{value:e.loginInfo.validateCode,callback:function(t){e.$set(e.loginInfo,"validateCode",t)},expression:"loginInfo.validateCode"}}),t("img",{staticStyle:{cursor:"pointer"},attrs:{width:"150",height:"50",src:e.loginInfo.codeImage,id:"mx",alt:e.$t("login.codeAlt"),border:"1",title:e.$t("login.codeAlt")},on:{click:e.generateCode}}),t("div",{staticClass:"Validform_checktip formtip"},[t("span",{},[t("i"),t("label")])])],1)]),t("el-form-item",[t("div",{staticClass:"input-box sub-box"},[t("el-button",{attrs:{type:"primary"},on:{click:e.handleLogin}},[e._v(e._s(e.$t("login.loginBtn")))])],1)])],1)],1)])])])},i=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"left"},[t("img",{attrs:{src:"/img/login-pic.png",alt:""}})])}],a=s("b775");function n(e){return new Promise((t,s)=>{Object(a["a"])({url:"/login.generatorValidateCode",method:"get",params:e}).then(e=>{const s=e.data;t(s)}).catch(e=>{s(e)})})}function l(e){return new Promise((t,s)=>{Object(a["a"])({url:"/login.supplyChainUserLogin",method:"post",data:e,headers:{"Content-Type":"application/json"}}).then(e=>{const s=e.data;t(s)}).catch(e=>{s(e)})})}var r={name:"Login",data(){return{loginInfo:{username:"",passwd:"",validateCode:"",codeImage:""}}},created(){this.generateCode()},methods:{generateCode(){n({_uId:"123"}).then(e=>{this.loginInfo.codeImage=e}).catch(e=>{console.error("获取验证码失败:",e)})},handleLogin(){this.loginInfo.username?this.loginInfo.passwd?this.loginInfo.validateCode?l(this.loginInfo).then(e=>{0===e.code?"03"===e.levelCd?(this.$store.dispatch("user/saveUserInfo",e),this.$router.push("/page")):this.$message.error(this.$t("login.notPurchaser")):this.$message.error(e.msg)}).catch(e=>{this.$message.error(e)}):this.$message.error(this.$t("login.codeRequired")):this.$message.error(this.$t("login.passwordRequired")):this.$message.error(this.$t("login.usernameRequired"))},handleRegister(){this.$router.push("/pageLR#/pages/plateform/register")}}},c=r,d=(s("ed06"),s("2877")),p=Object(d["a"])(c,o,i,!1,null,"9b22f044",null);t["default"]=p.exports}}]);
//# sourceMappingURL=chunk-915d7660.d666ac63.js.map