| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7b091ec6"],{"0778":function(e,t,a){"use strict";a("787a")},"5c4c":function(e,t,a){var i=a("a2d6"),r=a("ecaf").f,o=Function.prototype,n=o.toString,s=/^\s*function ([^ (]*)/,l="name";i&&!(l in o)&&r(o,l,{configurable:!0,get:function(){try{return n.call(this).match(s)[1]}catch(e){return""}}})},"787a":function(e,t,a){},a55b:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"bg"}},[a("el-container",[a("el-header"),a("el-main",[a("div",{staticClass:"bg"},[a("div",{staticClass:"big"},[e._v(" WiFi-DiGGER ")]),a("div",{staticClass:"midTitle"},[e._v(" 无线设备防护系统管理 ")]),a("div",{staticClass:"subTitle"},[e._v(" Wireless equipment detection system management ")]),a("el-card",{staticClass:"box-card"},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"0px"}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"用户名"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"密码",type:"password"},model:{value:e.form.pwd,callback:function(t){e.$set(e.form,"pwd",t)},expression:"form.pwd"}})],1),a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"验证码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onSubmit(t)}},model:{value:e.form.valid,callback:function(t){e.$set(e.form,"valid",t)},expression:"form.valid"}}),a("img",{attrs:{id:"validImg",src:e.valImgSrc,alt:"",width:"100px",height:"42px",title:"看不清?刷一下试试!"},on:{click:e.getGenVerifyPic}})],1),a("br"),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("登录")])],1)],1)],1)],1)]),a("el-footer")],1)],1)},r=[],o=(a("5c4c"),a("b8a1")),n=(a("379d"),a("1cfa")),s={data:function(){return{form:{name:"",pwd:"",valid:"",picId:""},valImgSrc:"",valImgId:"",overtime:"",userLevel:"",userLevelText:""}},mounted:function(){this.overtime=new Date,this.getGenVerifyPic(),1==this.$route.query.status&&(this.changeValImg(),this.overtime=new Date),document.body.clientWidth<1024&&this.$message.warning("请横屏使用本系统")},methods:{getGenVerifyPic:function(){var e=this,t={token:localStorage.token,width:100,height:42,noiseCount:10,length:4,source:123456789},a=n.stringify(t);Object(o["f"])(a).then((function(t){var a=t;e.valImgSrc=a.Pic,e.valImgId=a.Id,e.form.picId=a.Id}))},changeValImg:function(){this.getGenVerifyPic()},onSubmit:function(){this.pwdLoginBtn()},pwdLoginBtn:function(){var e=this,t=this.form.name,a=this.form.pwd,i=this.form.valid;e.overtime=new Date,globalValid(t,2,17,"用户名",e)&&globalValid(a,5,17,"密码",e)&&globalValid(i,3,5,"验证码",e)&&this.loginInfo()},getManagerSelfQuery:function(){var e=this,t={token:localStorage.token},a=n.stringify(t);ManagerSelfQuery(a).then((function(t){var a=t;if(0==a.Code)switch(e.userLevelText=a.Rs.Role.Name,e.userLevel=a.Rs.Role.Id,localStorage.shopId=a.Rs.ShopId,localStorage.ShopId=a.Rs.ShopId,parseInt(e.userLevel)){case 1:e.$router.push({path:"/"});break;case 2:e.$router.push({path:"/shopManage"});break;case 3:e.$router.push({path:"/"});break;case 4:e.$router.push({path:"/"});break}else{if(1010==a.Code)return e.$message.error(a.Memo+"【错误码】"+a.Code),e.$router.push({path:"/login",query:{status:1}}),!1;e.$message.error(a.Memo+"【错误码】"+a.Code)}}))},loginInfo:function(){var e=this,t=(headapi,this.form.name),a=this.form.pwd,i=this.form.valid,r=new Date,s=r-e.overtime,l=120;if(s>1e3*l)return e.changeValImg(),e.$message.error("验证码已超时,请重新输入"),!1;var c={verifyName:t,verifyCode:a,picCode:i,picId:this.form.picId,src:1,channel:2},m=n.stringify(c);Object(o["m"])(m).then((function(a){0==a.Code?(e.res=a.Rs,localStorage.userName=t,localStorage.token=a.Rs.token,e.$router.push({path:"/"})):10005==a.Code?(e.$refs.userpwd.value="",e.$notify({title:"警告",message:"密码错误,请重新输入",type:"warning"})):(e.$notify({title:"警告",message:a.Memo+",错误代码:"+a.Code,type:"warning"}),e.form.valid="",e.changeValImg())}))}}},l=s,c=(a("0778"),a("c701")),m=Object(c["a"])(l,i,r,!1,null,"41c47f8c",null);t["default"]=m.exports}}]);
- //# sourceMappingURL=chunk-7b091ec6.97c7e2ed.js.map
|