chunk-133bde8d.07f8fe64.js 2.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-133bde8d","chunk-2d0dd61c"],{"3dc0":function(t,e,s){},"80c1":function(t,e,s){"use strict";s.r(e);s("f16c");e["default"]={data(){return{form:{mobile:null,password:null,verifyCode:""},saving:!1,loading:!0}},mounted(){this.loading=!1},methods:{captchaChange(){this.form.verifyCode=""},async next(){const{mobile:t,password:e}=this.form;if(!t)return this.$message.warning("用户名不能为空");if(!e)return this.$message.warning("密码不能为空");this.saving=!0;try{await this.$store.dispatch("userLogin",this.form),"business"==this.$projectName?(await this.$store.dispatch("userInfo"),await this.$store.dispatch("shopInfo")):await this.$store.dispatch("adminInfo");const[t]=await this.$store.dispatch("permMenu");this.saving=!1,t?this.$nextTick(()=>{this.$projectName,this.$router.push("/")}):this.$message.error("该账号没有权限")}catch(s){this.saving=!1}}}}},b51c:function(t,e,s){"use strict";s("3dc0")},efcf:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"loginPage"},[e("div",{staticClass:"login_main"},[e("div",{staticClass:"login_left"}),e("div",{staticClass:"login_right"},[e("p",[t._v("欢迎登录")]),e("el-form",{ref:"form",staticClass:"form",attrs:{size:"medium",disabled:t.saving}},[e("el-form-item",{attrs:{label:"用户名"}},[e("el-input",{attrs:{placeholder:"请输入用户名",maxlength:"20","auto-complete":"off"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1),e("el-form-item",{attrs:{label:"密码"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入密码",maxlength:"20","auto-complete":"off"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),e("el-button",{staticClass:"submit-btn",attrs:{saving:t.saving},on:{click:t.next}},[t._v("登录")])],1)],1)])])},a=[],n=s("80c1"),o={mixins:[n["default"]],created(){}},r=o,l=(s("b51c"),s("1805")),c=Object(l["a"])(r,i,a,!1,null,"5d8029cb",null);e["default"]=c.exports}}]);