杨总惠通宝
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
htb_backend/public/kefu/js/chunk-0012bcd5.35bd29cb.js

1 lines
5.9 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0012bcd5"],{"67ee":function(e,t,n){"use strict";n("b2a4")},"6c7c":function(e,t,n){},"9ed6":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-account"},[n("div",{staticClass:"page_wrapper"},[n("div",{staticClass:"text"},[n("div",{staticClass:"title"},[e._v(e._s(e.config.site_name||""))]),e._v(" "),n("div",{staticClass:"info"},[e._v("让客户服务如此简单")])]),e._v(" "),n("div",{staticClass:"container containerSamll"},[n("div",{staticClass:"index_from page-account-container"},[e.isWeixin?n("div",[e._m(1),e._v(" "),n("div",{ref:"qrcode",staticClass:"erweima"})]):n("div",[e._m(0),e._v(" "),n("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,autocomplete:"on","label-position":"left"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}}},[n("el-form-item",{attrs:{prop:"account"}},[n("el-input",{ref:"account",attrs:{placeholder:"用户名","prefix-icon":"el-icon-user",name:"username",type:"text",tabindex:"1",autocomplete:"on"},model:{value:e.loginForm.account,callback:function(t){e.$set(e.loginForm,"account",t)},expression:"loginForm.account"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"password"}},[n("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"密码",name:"password",tabindex:"2","auto-complete":"on","prefix-icon":"el-icon-lock"},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),e._v(" "),n("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[n("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1),e._v(" "),n("el-form-item",{staticClass:"captcha",attrs:{prop:"code"}},[n("div",{staticClass:"captcha"},[n("el-input",{ref:"username",staticStyle:{width:"168px"},attrs:{"prefix-icon":"el-icon-message",placeholder:"验证码",name:"username",type:"text",tabindex:"3",autocomplete:"on"},model:{value:e.loginForm.code,callback:function(t){e.$set(e.loginForm,"code",t)},expression:"loginForm.code"}}),e._v(" "),n("div",{staticClass:"imgs",on:{click:function(t){return e.getCaptcha()}}},[n("img",{attrs:{src:e.captchatImg}})])],1)]),e._v(" "),n("el-button",{staticStyle:{width:"100%","margin-bottom":"30px"},attrs:{loading:e.loading,type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e._v("登录\n ")])],1)],1)])]),e._v(" "),-1==e.version.status?n("div",{staticClass:"record_number"},[e._v("Copyright "+e._s(e.version.year)+" "),n("a",{attrs:{href:"http://"+e.version.url,target:"_blank"}},[e._v(e._s(e.version.url))])]):n("div",{staticClass:"record_number"},[e._v("Copyright "+e._s(e.version.Copyright))])])])},o=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-account-top"},[n("div",{staticClass:"page-account-top-logo"},[n("span",[e._v("客服登录")])])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-account-top"},[n("div",{staticClass:"page-account-top-logo"},[n("span",[e._v("微信扫码登录")])])])}],a=(n("ac6a"),n("456d"),n("42e3")),r=(n("d044"),n("5f87"),n("a78e")),s=n.n(r),c={name:"Login",data:function(){var e=function(e,t,n){t?n():n(new Error("请输入用户名"))},t=function(e,t,n){t?t.length<6?n(new Error("请输入不少于6位数的密码")):n():n(new Error("请输入密码"))};return{fullWidth:document.body.clientWidth,swiperOption:{pagination:{el:".pagination"},autoplay:{enabled:!0,disableOnInteraction:!1,delay:3e3}},captchatImg:"",loginLogo:"",swiperList:[],loginForm:{account:"",password:"",key:"",code:""},loginRules:{account:[{required:!0,trigger:"blur",validator:e}],password:[{required:!0,trigger:"blur",validator:t}],code:[{required:!0,message:"请输入正确的验证码",trigger:"blur"}]},passwordType:"password",isWeixin:!1,capsTooltip:!1,loading:!1,showDialog:!1,redirect:void 0,otherQuery:{},scanKey:"",scanTimer:null,config:s.a.get("ser_config")||{},version:{}}},watch:{$route:{fullWidth:function(e){if(!this.timer){this.screenWidth=e,this.timer=!0;var t=this;setTimeout((function(){t.timer=!1}),400)}},handler:function(e){var t=e.query;t&&(this.redirect=t.redirect,this.otherQuery=this.getOtherQuery(t))},immediate:!0}},created:function(){var e=this;document.onkeydown=function(t){if(-1!==e.$route.path.indexOf("login")){var n=window.event.keyCode;13===n&&e.handleLogin()}},window.addEventListener("resize",this.handleResize)},mounted:function(){var e=this;this.getCaptcha(),Object(a["f"])().then((function(t){e.config=t.data,s.a.set("ser_config",t.data)})),this.getVersion()},methods:{getCaptcha:function(){var e=this;Object(a["d"])().then((function(t){var n=t.data;e.captchatImg=n.captcha,e.loginForm.key=n.key})).catch((function(){e.$message.error("请求失败")}))},checkCapslock:function(e){var t=e.key;this.capsTooltip=t&&1===t.length&&t>="A"&&t<="Z"},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))},handleLogin:function(){var e=this;this.$refs["loginForm"].validate((function(t){if(!t)return!1;e.loading=!0,e.$store.dispatch("user/login",e.loginForm).then((function(t){e.$router.push({path:e.redirect||"/",query:e.otherQuery}),e.loading=!1})).catch((function(t){e.loginForm.code="",e.$message.error(t.message||"请求失败"),e.loading=!1,e.getCaptcha()}))}))},getOtherQuery:function(e){return Object.keys(e).reduce((function(t,n){return"redirect"!==n&&(t[n]=e[n]),t}),{})},handleResize:function(e){},getVersion:function(){var e=this;Object(a["v"])().then((function(t){e.version=t.data}))}}},l=c,d=(n("f46d"),n("67ee"),n("2877")),u=Object(d["a"])(l,i,o,!1,null,"7a3c08d2",null);t["default"]=u.exports},b2a4:function(e,t,n){},f46d:function(e,t,n){"use strict";n("6c7c")}}]);