webpackJsonp([17],{"7Otq":function(e,t){e.exports="data:image/png;base64,[encoded data, 9080 characters]"},"T+/8":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("mvHQ"),s=r.n(n),o=r("PI0u"),a=r("MJLE"),i=r.n(a),c=r("Ch4/"),l=r("P9l9"),d={name:"login",data:function(){return{qrcodeCase:"",qrcodeNum:"",enterpriseId:"",expiredFlag:!1,canSelectFlag:!1,userId:"",ajaxTime:null,chooseTab:"qrcode",enterpriseList:[],numberCode:""}},computed:{},methods:{toRouterView:function(e){this.$router.push({path:e.path})},chooseLogin:function(e,t){this.chooseTab=t,document.getElementById("qrcode").innerHTML="",this.qrcodeCase.clear(),clearInterval(this.ajaxTime),"pass"!=t?this.expiredFlag=!1:this.qrcodeNum="",document.getElementById("line-active").style.width=e.target.offsetWidth+"px",document.getElementById("line-active").style.left=e.target.offsetLeft+"px"},collapseTag:function(e){this.collapseFlag=e},qrcode:function(e){var t={type:"web-login",data:e||"123456789"};this.qrcodeCase=new i.a("qrcode",{width:190,height:190,text:s()(t)}),document.getElementById("qrcode").title=""},refreshCode:Object(o.a)(function(){this.qrcodeCase&&(document.getElementById("qrcode").innerHTML="",this.qrcodeCase.clear()),this.getQrcode(),this.expiredFlag=!1},500),toIndex:Object(o.a)(function(){this.toLogin()},500),toLogin:Object(o.a)(function(){var e=this,t={qrcode:e.qrcodeNum||"debug",enterpriseId:e.enterpriseId,userId:e.userId};Object(l.d)("/haoban-manage3-web/login_local",t).then(function(t){var r=t.data;if(1==r.errorCode)return localStorage.removeItem("userInfo"),void localStorage.setItem("userInfos",s()(r.result));30004==r.errorCode&&(e.canSelectFlag=!1,"qrcode"==e.chooseTab&&(e.getQrcode(),e.expiredFlag=!1)),c.a.errorMsg(r)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},500),checkLogin:function(){var e=this,t={qrcode:e.qrcodeNum};Object(l.d)("/haoban-manage3-web/login-check",t).then(function(t){var r=t.data;if(1!=r.errorCode)30002==r.errorCode&&(e.expiredFlag=!0),c.a.errorMsg(r),clearInterval(e.ajaxTime);else if(r.result&&r.result.enterpriseList&&r.result.enterpriseList.length){if(e.enterpriseList=r.result.enterpriseList,e.enterpriseId=e.enterpriseList[0].enterpriseId,e.userId=r.result.userId,document.getElementById("qrcode").innerHTML="",e.qrcodeCase.clear(),clearInterval(e.ajaxTime),1==r.result.enterpriseList.length)return e.toLogin(),!1;e.canSelectFlag=!0}}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},checkScan:function(){var e=this;clearInterval(e.ajaxTime),e.ajaxTime=null,e.ajaxTime=setInterval(function(){e.checkLogin()},3e3)},getQrcode:function(){var e=this;Object(l.d)("/haoban-manage3-web/get-login-qrcode",{}).then(function(t){var r=t.data;if(1==r.errorCode)return e.qrcodeNum=r.result,void(window.location.href=""+r.result);c.a.errorMsg(r)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},changeCode:function(e){this.numberCode=e}},mounted:function(){this.getQrcode(),localStorage.getItem("userInfos")&&localStorage.removeItem("userInfos")},components:{}},A={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-wrap"},[r("section",[r("div",{staticClass:"login-body-top"},[e._m(0),e._v(" "),r("div",{staticClass:"login-body-qrcode"},[r("div",{staticClass:"login-qrcode-inner border-box"},[r("div",{staticClass:"qrcode-title font-18 color-303133 m-b-20"},[e._v("企业微信扫码登录")]),e._v(" "),r("div",{attrs:{id:"qrcode",title:""}}),e._v(" "),r("div",{staticClass:"qrcode-refresh m-t-20"},[r("el-button",{staticClass:"font-12",attrs:{type:"text"},on:{click:e.refreshCode}},[e._v("刷新 "),r("span",{staticClass:"color-2f54eb iconfont iconshuaxin"})])],1)])]),e._v(" "),r("div",{staticClass:"bg-dot"}),e._v(" "),r("div",{staticClass:"bg-dot-center"})]),e._v(" "),r("div",{staticClass:"login-body-bottom"})]),e._v(" "),r("footer",{staticClass:"p-t-35"},[r("vue-gic-footer")],1)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"login-body-head"},[t("div",{staticClass:"login-body-head_inner border-box flex"},[t("img",{staticClass:"login-body-logo",attrs:{src:r("7Otq"),alt:"logo"}}),this._v(" "),t("span",{staticClass:"login-body-title p-l-7"},[this._v("好办管理后台")])])])}]};var g=r("VU/8")(d,A,!1,function(e){r("jyJ8")},"data-v-d73f5746",null);t.default=g.exports},jyJ8:function(e,t){}});