mirror of
https://github.com/shawncai/ERP.git
synced 2025-01-04 06:25:32 +08:00
1 line
No EOL
4.1 KiB
JavaScript
1 line
No EOL
4.1 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c9bd"],{"7/cP":function(t,n,s){},V27w:function(t,n,s){"use strict";var e=s("7/cP");s.n(e).a},c11S:function(t,n,s){"use strict";var e=s("gTgX");s.n(e).a},gTgX:function(t,n,s){},ntYl:function(t,n,s){"use strict";s.r(n);var e=s("fe1z"),a=s("ETGp"),o={name:"SocialSignin",methods:{wechatHandleClick:function(t){alert("ok")},tencentHandleClick:function(t){alert("ok")}}},i=(s("V27w"),s("KHd+")),c=Object(i.a)(o,function(){var t=this,n=t.$createElement,s=t._self._c||n;return s("div",{staticClass:"social-signup-container"},[s("div",{staticClass:"sign-btn",on:{click:function(n){t.wechatHandleClick("wechat")}}},[s("span",{staticClass:"wx-svg-container"},[s("svg-icon",{staticClass:"icon",attrs:{"icon-class":"wechat"}})],1),t._v(" 微信\n ")]),t._v(" "),s("div",{staticClass:"sign-btn",on:{click:function(n){t.tencentHandleClick("tencent")}}},[s("span",{staticClass:"qq-svg-container"},[s("svg-icon",{staticClass:"icon",attrs:{"icon-class":"qq"}})],1),t._v(" QQ\n ")])])},[],!1,null,"20f71181",null);c.options.__file="socialsignin.vue";var l=c.exports,r={name:"Login",components:{LangSelect:a.a,SocialSign:l},data:function(){return{loginForm:{username:"",password:""},passwordType:"password",loading:!1,showDialog:!1,redirect:void 0}},watch:{$route:{handler:function(t){this.redirect=t.query&&t.query.redirect},immediate:!0}},created:function(){},destroyed:function(){},methods:{showPwd:function(){"password"===this.passwordType?this.passwordType="":this.passwordType="password"},handleLogin:function(){var t=this;this.loading=!0,Object(e.b)(this.loginForm.username,this.loginForm.password).then(function(n){100===n.data.ret?(t.$message({showClose:!0,message:n.data.msg,type:"error"}),t.loading=!1):200===n.data.ret&&(t.$message({showClose:!0,message:"login successful",type:"success"}),t.$store.dispatch("LoginByUsername",t.loginForm).then(function(n){t.loading=!1,t.$router.push({path:t.redirect||"/"})}).catch(function(){t.loading=!1}))})},afterQRScan:function(){}}},u=(s("c11S"),s("rOKb"),Object(i.a)(r,function(){var t=this,n=t.$createElement,s=t._self._c||n;return s("div",{staticClass:"login-container"},[s("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:t.loginForm,"auto-complete":"on","label-position":"left"}},[s("div",{staticClass:"title-container"},[s("h3",{staticClass:"title"},[t._v(t._s(t.$t("login.title")))]),t._v(" "),s("lang-select",{staticClass:"set-language"})],1),t._v(" "),s("el-form-item",{attrs:{prop:"username"}},[s("span",{staticClass:"svg-container"},[s("svg-icon",{attrs:{"icon-class":"user"}})],1),t._v(" "),s("el-input",{attrs:{placeholder:t.$t("login.username"),name:"username",type:"text",clearable:"","auto-complete":"on"},model:{value:t.loginForm.username,callback:function(n){t.$set(t.loginForm,"username",n)},expression:"loginForm.username"}})],1),t._v(" "),s("el-form-item",{attrs:{prop:"password"}},[s("span",{staticClass:"svg-container"},[s("svg-icon",{attrs:{"icon-class":"password"}})],1),t._v(" "),s("el-input",{attrs:{type:t.passwordType,placeholder:t.$t("login.password"),name:"password","auto-complete":"on"},nativeOn:{keyup:function(n){return"button"in n||!t._k(n.keyCode,"enter",13,n.key,"Enter")?t.handleLogin(n):null}},model:{value:t.loginForm.password,callback:function(n){t.$set(t.loginForm,"password",n)},expression:"loginForm.password"}}),t._v(" "),s("span",{staticClass:"show-pwd",on:{click:t.showPwd}},[s("svg-icon",{attrs:{"icon-class":"eye"}})],1)],1),t._v(" "),s("el-button",{staticStyle:{width:"100%","margin-bottom":"30px"},attrs:{loading:t.loading,type:"primary"},nativeOn:{click:function(n){return n.preventDefault(),t.handleLogin(n)}}},[t._v(t._s(t.$t("login.logIn")))])],1),t._v(" "),s("el-dialog",{attrs:{title:t.$t("login.thirdparty"),visible:t.showDialog,"append-to-body":""},on:{"update:visible":function(n){t.showDialog=n}}},[t._v("\n "+t._s(t.$t("login.thirdpartyTips"))+"\n "),s("br"),t._v(" "),s("br"),t._v(" "),s("br"),t._v(" "),s("social-sign")],1)],1)},[],!1,null,"046cb86a",null));u.options.__file="index.vue";n.default=u.exports},rOKb:function(t,n,s){"use strict";var e=s("s0/C");s.n(e).a},"s0/C":function(t,n,s){}}]); |