| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-88eca626","chunk-2d0dd61c"],{4792:function(e,t,a){},"78bb":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"scope"},[t("div",{staticClass:"tmp2"},[t("h4",{staticClass:"title"},[e._v("x-admin")]),t("el-form",{ref:"form",staticClass:"form",attrs:{size:"medium",disabled:e.saving}},[t("el-form-item",{attrs:{label:"用户名"}},[t("el-input",{attrs:{placeholder:"请输入用户名",maxlength:"20","auto-complete":"off",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.next.apply(null,arguments)}},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),t("el-form-item",{attrs:{label:"密码"}},[t("el-input",{attrs:{type:"password",placeholder:"请输入密码",maxlength:"20","auto-complete":"off",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.next.apply(null,arguments)}},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),t("el-form-item",{staticClass:"captcha",attrs:{label:"验证码"}},[t("el-input",{attrs:{placeholder:"请输入图片验证码",maxlength:"4","auto-complete":"off",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.next.apply(null,arguments)}},model:{value:e.form.verifyCode,callback:function(t){e.$set(e.form,"verifyCode",t)},expression:"form.verifyCode"}}),t("captcha",{ref:"captcha",staticClass:"value",on:{change:e.captchaChange},model:{value:e.form.captchaId,callback:function(t){e.$set(e.form,"captchaId",t)},expression:"form.captchaId"}})],1),t("el-button",{staticClass:"submit-btn",attrs:{saving:e.saving},on:{click:e.next}},[e._v("登录")])],1)],1)])},n=[],i=(a("b138"),a("8bc2")),r=a("80c1"),o={mixins:[r["default"]],beforeRouteEnter(e,t,a){document.querySelector("meta[name='viewport']")["content"]="width=device-width, initial-scale=1",a()},beforeRouteLeave(e,t,a){document.querySelector("meta[name='viewport']")["content"]="",a()},created(){Object(i["isPc"])()&&this.$router.push("/login")}},l=o,c=(a("d53b"),a("1805")),u=Object(c["a"])(l,s,n,!1,null,"8770dbda",null);t["default"]=u.exports},"80c1":function(e,t,a){"use strict";a.r(t);a("b138");t["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:e,password:t}=this.form;if(!e)return this.$message.warning("用户名不能为空");if(!t)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[e]=await this.$store.dispatch("permMenu");this.saving=!1,e?this.$nextTick(()=>{this.$projectName,this.$router.push("/")}):this.$message.error("该账号没有权限")}catch(a){this.saving=!1}}}}},d53b:function(e,t,a){"use strict";a("4792")}}]);
|