glhcp/server/public/kefu/js/chunk-72ef8297.586104ce.js

2 lines
4.8 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-72ef8297"],{"0782":function(t,e,o){t.exports={primary:"#4073FA"}},"3ec4":function(t,e,o){"use strict";o("0782")},"53ca":function(t,e,o){"use strict";o.d(e,"a",(function(){return r}));o("a4d3"),o("e01a"),o("d3b7"),o("d28b"),o("3ca3"),o("ddb0");function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}},9760:function(t,e,o){"use strict";o.r(e);var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"login"},[o("div",{staticClass:"main"},[o("div",{staticClass:"login-container"},[o("div",{staticClass:"title"},[t._v(t._s(t.$route.query.type?"商家客服登录":"平台客服登录"))]),o("div",{staticClass:"form m-t-40"},[o("el-form",{ref:"form",attrs:{model:t.accountObj,rules:t.rules}},[o("el-form-item",{attrs:{prop:"account"}},[o("el-input",{attrs:{placeholder:"请输入账号"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.inputPwd.focus()}},model:{value:t.accountObj.account,callback:function(e){t.$set(t.accountObj,"account",e)},expression:"accountObj.account"}},[o("i",{staticClass:"el-input__icon el-icon-s-custom",attrs:{slot:"prefix"},slot:"prefix"})])],1),o("el-form-item",{attrs:{prop:"password"}},[o("el-input",{ref:"inputPwd",attrs:{placeholder:"请输入密码","show-password":""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin.apply(null,arguments)}},model:{value:t.accountObj.password,callback:function(e){t.$set(t.accountObj,"password",e)},expression:"accountObj.password"}},[o("i",{staticClass:"el-input__icon el-icon-s-cooperation",attrs:{slot:"prefix"},slot:"prefix"})])],1),o("div",{staticClass:"m-b-10 p-t-10"},[o("el-checkbox",{attrs:{label:"记住账号"},model:{value:t.rememberAccount,callback:function(e){t.rememberAccount=e},expression:"rememberAccount"}})],1),o("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary",loading:t.loadingLogin},on:{click:t.handleLogin}},[t._v("登录")])],1)],1)])]),o("div",{staticClass:"footer"},[t._v(t._s(t.copyright))])])},n=[],c=o("5530"),i=(o("ac1f"),o("5319"),o("53ca")),a=(o("e9c4"),{keyPrev:"kefu_",set:function(t,e,o){var r={expire:o?this.time()+o:"",value:e};"object"===Object(i["a"])(r)&&(r=JSON.stringify(r));try{window.localStorage.setItem(t,r)}catch(n){return!1}},get:function(t){try{var e=window.localStorage.getItem(t);if(!e)return!1;var o=JSON.parse(e),r=o.value,n=o.expire;return n&&n<this.time()?(window.localStorage.removeItem(t),!1):r}catch(c){return!1}},time:function(){return Math.round((new Date).getTime()/1e3)},remove:function(t){t&&window.localStorage.removeItem(t)},getKey:function(t){return this.keyPrev+t}}),s=a,u=(o("b562"),o("2f62")),l={data:function(){return{rememberAccount:!1,loadingLogin:!1,accountObj:{account:"",password:""},rules:{account:[{required:!0,message:"请输入账号",trigger:["blur"]}],password:[{required:!0,message:"请输入密码",trigger:["blur"]}]}}},methods:{handleLogin:function(){var t=this;this.$refs.form.validate((function(e){e&&(s.set("remember_account",{remember:t.rememberAccount,account:t.accountObj.account}),t.login())}))},login:function(){var t=this;this.loadingLogin=!0;var e=this.accountObj,o=e.account,r=e.password;this.$store.dispatch("login",{account:o,password:r,type:this.$route.query.type||0}).then((function(e){var o=t.$route.query.redirect,r="string"===typeof o?o:"/";t.$router.replace(r)})).catch((function(){t.loadingLogin=!1}))}},computed:Object(c["a"])({},Object(u["c"])(["copyright"])),created:function(){var t=s.get("remember_account");t.remember&&(this.rememberAccount=t.remember,this.accountObj.account=t.account)}},p=l,d=(o("3ec4"),o("2877")),f=Object(d["a"])(p,r,n,!1,null,null,null);e["default"]=f.exports},d28b:function(t,e,o){var r=o("746f");r("iterator")},e01a:function(t,e,o){"use strict";var r=o("23e7"),n=o("83ab"),c=o("da84"),i=o("e330"),a=o("1a2d"),s=o("1626"),u=o("3a9b"),l=o("577e"),p=o("9bf2").f,d=o("e893"),f=c.Symbol,m=f&&f.prototype;if(n&&s(f)&&(!("description"in m)||void 0!==f().description)){var b={},y=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=u(m,this)?new f(t):void 0===t?f():f(t);return""===t&&(b[e]=!0),e};d(y,f),y.prototype=m,m.constructor=y;var v="Symbol(test)"==String(f("test")),g=i(m.toString),h=i(m.valueOf),w=/^Symbol\((.*)\)[^)]+$/,O=i("".replace),k=i("".slice);p(m,"description",{configurable:!0,get:function(){var t=h(this),e=g(t);if(a(b,t))return"";var o=v?k(e,7,-1):O(e,w,"$1");return""===o?void 0:o}}),r({global:!0,constructor:!0,forced:!0},{Symbol:y})}}}]);
//# sourceMappingURL=chunk-72ef8297.586104ce.js.map