mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 04:52:50 +00:00
1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-169abc05"],{"0729":function(t,e,r){"use strict";var n=r("718b");r.n(n).a},3736:function(t,e,r){},"3dda":function(t,e){},"433f":function(t,e,r){t.exports=r.p+"system_static/img/sw.3ef10e8b.jpg"},"59da":function(t,e,r){t.exports=r.p+"system_static/img/logo-dark.b9962944.png"},"718b":function(t,e,r){},a979:function(t,e,r){"use strict";var n=r("3736");r.n(n).a},d666:function(t,e,r){"use strict";r.r(e);var n=r("0122"),i=r("c964"),o=(r("b0c0"),r("99af"),r("ac1f"),r("5319"),r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("159b"),r("131a"),r("fb6a"),r("42e3")),a=r("3dda"),c=(a=r.n(a),r("d708")),s=r("c276"),u=r("d044"),l=r.n(u);function f(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o,a,c,s;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new k(n||[]);return i(e,"_invoke",{value:(o=t,a=r,c=n,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return L()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r&&(r=function t(e,r){var n=r.method,i=e.iterator[n];return void 0===i?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h):(n=d(i,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,h):(i=n.arg,i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)))}(r,c),r)){if(r===h)continue;return r}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(s="executing",r=d(o,a,c),"normal"===r.type){if(s=c.done?"completed":"suspendedYield",r.arg===h)continue;return{value:r.arg,done:c.done}}"throw"===r.type&&(s="completed",c.method="throw",c.arg=r.arg)}})}),e}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function p(){}function m(){}function v(){}o={};var g=(u(o,a,(function(){return this})),Object.getPrototypeOf),y=(g=g&&g(g(I([]))),g&&g!==e&&r.call(g,a)&&(o=g),v.prototype=p.prototype=Object.create(o));function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var o;i(this,"_invoke",{value:function(i,a){function c(){return new e((function(o,c){!function i(o,a,c,s){var u;o=d(t[o],t,a);if("throw"!==o.type)return(a=(u=o.arg).value)&&"object"==Object(n.a)(a)&&r.call(a,"__await")?e.resolve(a.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):e.resolve(a).then((function(t){u.value=t,c(u)}),(function(t){return i("throw",t,c,s)}));s(o.arg)}(i,a,o,c)}))}return o=o?o.then(c,c):c()}})}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function I(t){if(t){var e,n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:L}}function L(){return{value:void 0,done:!0}}return i(y,"constructor",{value:m.prototype=v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=u(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,c,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),u(y,s,"Generator"),u(y,a,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=I,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;0<=i;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}var a=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(r=i.completion).type&&(n=r.arg,_(i)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}u={mixins:[a.a],data:function(){return{fullWidth:document.documentElement.clientWidth,swiperOption:{pagination:".swiper-pagination",autoplay:!0},modals:!1,autoLogin:!0,imgcode:"",formInline:{username:"",password:"",code:""},ruleInline:{username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},errorNum:0,jigsaw:null,login_logo:"",swiperList:[],defaultSwiperList:r("433f"),loginType:0,codeKey:"",scanTime:"",rxpired:!1,isMobile:!1,version:"",isScan:!1,timeNum:0,copyright:"",copyrightImg:r("59da")}},created:function(){var t=this,e=(Object(o.p)().then((function(e){t.version=e.data.version,t.copyright=e.data.copyright,e.data.site_name&&(document.title=e.data.site_name),e.data.copyrightImg&&(t.copyrightImg=e.data.copyrightImg)})),this.isMobile=this.$store.state.media.isMobile,this);top!=window&&(top.location.href=location.href),document.onkeydown=function(t){"login"===e.$route.name&&13===window.event.keyCode&&e.handleSubmit("formInline")},window.addEventListener("resize",this.handleResize)},watch:{fullWidth:function(t){var e;this.timer||(this.screenWidth=t,this.timer=!0,e=this,setTimeout((function(){e.timer=!1}),400))},$route:function(t){this.captchas()}},mounted:function(){this.$nextTick((function(){})),this.captchas()},methods:{bindScan:function(){this.isScan||(this.isScan=!0,this.getSanCodeKey()),this.loginType=1},creatQrCode:function(){var t="".concat(window.location.protocol,"//").concat(window.location.host,"/pages/users/scan_login/index?key=").concat(this.codeKey);new l.a(this.$refs.qrCodeUrl,{text:t,width:160,height:160,colorDark:"#000000",colorLight:"#ffffff",correctLevel:l.a.CorrectLevel.H})},closeModel:function(){var t=this;Object(o.a)({account:this.formInline.username,password:this.formInline.password,imgcode:this.formInline.code}).then(function(){var e=Object(i.a)(f().mark((function e(r){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.getExpiresTime(r.data.exp_time),Object(s.o)("kefu_uuid",r.data.kefuInfo.uid,n),Object(s.o)("kefu_token",r.data.token,n),Object(s.o)("kefu_expires_time",r.data.exp_time,n),Object(s.o)("kefuInfo",r.data.kefuInfo,n),t.$store.commit("kefu/setInfo",r.data.kefuInfo),t.$store.state.media.isMobile)return e.abrupt("return",t.$router.replace({path:t.$route.query.redirect||"/kefu/mobile_list"}));e.next=10;break;case 10:return e.abrupt("return",t.$router.replace({path:t.$route.query.redirect||"/kefu/pc_list"}));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){e=void 0===e?{}:e,t.errorNum++,t.captchas(),t.$message.error(e.msg||"登录失败"),t.jigsaw&&t.jigsaw.reset()}))},getExpiresTime:function(t){var e=Math.round(new Date/1e3);return parseFloat(parseFloat(parseFloat((t-e)/60)/60)/24)},closefail:function(){this.jigsaw&&this.jigsaw.reset(),this.$message.error("校验错误")},handleResize:function(t){this.fullWidth=document.documentElement.clientWidth},captchas:function(){this.imgcode=c.a.apiBaseURL+"/captcha_pro?"+Date.parse(new Date)},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){t&&e.closeModel()}))},getSanCodeKey:function(){var t=this;Object(o.l)().then((function(e){t.codeKey=e.data.key,t.creatQrCode(),t.scanTime=setInterval((function(){t.timeNum++,60<=t.timeNum?(t.timeNum=0,window.clearInterval(t.scanTime),t.rxpired=!0):t.getScanStatus()}),1e3)})).catch((function(e){t.timeNum=0,window.clearInterval(t.scanTime),t.rxpired=!0,t.$message.error(e.msg)}))},getScanStatus:function(){var t=this;Object(o.H)(this.codeKey).then(function(){var e=Object(i.a)(f().mark((function e(r){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0==r.data.status&&(t.timeNum=0,window.clearInterval(t.scanTime),t.rxpired=!0),r.data.status,3!=r.data.status)e.next=15;else{if(window.clearInterval(t.scanTime),n=t.getExpiresTime(r.data.exp_time),Object(s.o)("kefu_uuid",r.data.kefuInfo.uid,n),Object(s.o)("kefu_token",r.data.token,n),Object(s.o)("kefu_expires_time",r.data.exp_time,n),Object(s.o)("kefuInfo",r.data.kefuInfo,n),t.$store.commit("kefu/setInfo",r.data.kefuInfo),t.$store.state.media.isMobile)return e.abrupt("return",t.$router.replace({path:t.$route.query.redirect||"/kefu/mobile_list"}));e.next=14}break;case 14:return e.abrupt("return",t.$router.replace({path:t.$route.query.redirect||"/kefu/pc_list"}));case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.msg),t.timeNum=0,window.clearInterval(t.scanTime),t.rxpired=!0}))},bindRefresh:function(){this.$refs.qrCodeUrl.innerHTML="",this.rxpired=!1,this.getSanCodeKey()}},beforeCreate:function(){},beforeDestroy:function(){this.timeNum=0,this.$refs.qrCodeUrl.innerHTML="",window.clearInterval(this.scanTime),window.removeEventListener("resize",this.handleResize)}},r("0729"),r("a979"),a=r("2877"),a=Object(a.a)(u,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"wrapper-box"},[e("div",{staticClass:"page-account kf"},[e("div",{staticClass:"content"},[e("img",{attrs:{src:t.copyrightImg,alt:""}}),t._m(0)]),e("div",{staticClass:"container",class:[768<t.fullWidth?"containerSamll":"containerBig"]},[e("div",{staticClass:"index_from page-account-container"},[e("div",{style:{display:t.loginType?"none":"block"}},[t._m(1),e("el-form",{ref:"formInline",attrs:{model:t.formInline,rules:t.ruleInline},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSubmit("formInline")}}},[e("el-form-item",{attrs:{prop:"username"}},[e("el-input",{attrs:{type:"text",placeholder:"请输入用户名",size:"large"},model:{value:t.formInline.username,callback:function(e){t.$set(t.formInline,"username",e)},expression:"formInline.username"}})],1),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入密码",size:"large"},model:{value:t.formInline.password,callback:function(e){t.$set(t.formInline,"password",e)},expression:"formInline.password"}})],1),e("el-form-item",[e("el-button",{staticClass:"btn",attrs:{type:"primary",long:"",size:"large"},on:{click:function(e){return t.handleSubmit("formInline")}}},[t._v("登录 ")])],1)],1),t.isMobile?t._e():e("div",{staticClass:"qh_box",on:{click:t.bindScan}},[e("span",{staticClass:"iconfont iconerweima2"})])],1),e("div",{style:{display:t.loginType?"block":"none"}},[t._m(2),e("div",{staticClass:"code-box"},[e("div",{ref:"qrCodeUrl",staticClass:"qrcode"}),e("div",{directives:[{name:"show",rawName:"v-show",value:t.rxpired,expression:"rxpired"}],staticClass:"rxpired-box"},[e("p",[t._v("已过期")]),e("el-button",{attrs:{type:"primary"},on:{click:t.bindRefresh}},[t._v("点击刷新")])],1)]),e("div",{staticClass:"qh_box",on:{click:function(e){t.loginType=0}}},[e("span",{staticClass:"iconfont iconzhanghaomima"})])])])])]),t.copyright?e("div",{staticClass:"foot-box"},[t._v(t._s(t.copyright))]):e("div",{staticClass:"foot-box"},[t._v("\n Copyright © 2014-2023 "),e("a",{attrs:{href:"https://www.crmeb.com",target:"_blank"}},[t._v(t._s(t.version))])])])}),[function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"desc"},[e("p",{staticClass:"tit"},[t._v("让客户服务如此简单")]),e("p",{staticClass:"kefu"},[t._v("专业客服系统"),e("br"),t._v("助力企业打造一流的服务体验")])])},function(){var t=this.$createElement;t=this._self._c||t;return t("div",{staticClass:"page-account-top"},[t("div",{staticClass:"page-account-top-logo"},[this._v("客服登录")])])},function(){var t=this.$createElement;t=this._self._c||t;return t("div",{staticClass:"page-account-top"},[t("div",{staticClass:"page-account-top-logo"},[this._v("微信扫码登录")])])}],!1,null,"429b021d",null),e.default=a.exports}}]); |