login-legacy-f2a7a0ba.js 23 KB

1
  1. !function(){function t(e){return t="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},t(e)}var e=["returnUrl","isRegister"];function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new L(r||[]);return o(a,"_invoke",{value:x(t,n,u)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}e.wrap=f;var p={};function h(){}function g(){}function m(){}var v={};s(v,u,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(j([])));_&&_!==n&&r.call(_,u)&&(v=_);var b=m.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,n){function i(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&r.call(f,"__await")?n.resolve(f.__await).then((function(t){i("next",t,u,c)}),(function(t){i("throw",t,u,c)})):n.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return i("throw",t,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,e){function r(){return new n((function(n,r){i(t,e,n,r)}))}return a=a?a.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function k(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var o=d(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function C(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function j(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return g.prototype=m,o(b,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:g,configurable:!0}),g.displayName=s(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(S.prototype),s(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new S(f(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),s(b,l,"Generator"),s(b,u,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=j,L.prototype={constructor:L,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(O),!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(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function a(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(l){return void n(l)}u.done?e(c):Promise.resolve(c).then(r,o)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){a(i,r,o,u,c,"next",t)}function c(t){a(i,r,o,u,c,"throw",t)}u(void 0)}))}}function c(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(s){l=!0,o=s}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}System.register(["./index-legacy-66282aee.js","./index-legacy-ae338a30.js"],(function(t,n){"use strict";var a,s,f,d,p,h,g,m,v,y,_,b,w,S,x,k,C,O,L,j,E,P,T,D,I,q,N,z,$,A,F,U,G,V,R,B,H,M,W,Y,J,K=document.createElement("style");return K.textContent="._imgCode_mq980_1{padding:.42667rem}._imgCode_mq980_1 ._codeTitle_mq980_4{text-align:center;font-size:.42667rem;color:#4f4f4f;margin:0;padding-bottom:.42667rem}._imgCode_mq980_1 ._img_mq980_1{display:flex;align-items:center;justify-content:center}._imgCode_mq980_1 ._imgChange_mq980_16{display:block;color:#aaa;font-size:.32rem;text-align:center;padding-top:.13333rem}._imgCode_mq980_1 ._field_mq980_23{background:#f4f4f4;padding:.26667rem .32rem!important}._imgCodePopup_mq980_27{width:90%;border-radius:.13333rem;overflow:initial}._imgCodePopup_mq980_27 .van-popup__close-icon{top:-.98667rem!important;right:0!important;font-size:.66667rem;color:#fff}._login_pvck2_1{min-height:100vh;padding:0 1.28rem;background:linear-gradient(to bottom,#01c1b5,#1bcbbf)}._login_pvck2_1 ._codeText_pvck2_6{color:#fff}._login_pvck2_1 ._logo_pvck2_9{display:table;padding-top:2.66667rem;padding-bottom:2.4rem;width:4.26667rem;height:1.2rem;margin:0 auto}._login_pvck2_1 ._logo_pvck2_9 img{width:inherit;height:inherit}._login_pvck2_1 ._container_pvck2_21{background-color:transparent}._login_pvck2_1 ._input-group_pvck2_24{position:relative;border-radius:1.33333rem;border:.05333rem solid #fff;margin-bottom:.53333rem;padding-left:.8rem;padding-right:.8rem;display:flex;align-items:center;background:transparent}._login_pvck2_1 ._input-group_pvck2_24 input{flex:1;font-size:.37333rem;color:#fff;background:transparent;border:none}._login_pvck2_1 ._input-group_pvck2_24 input::-moz-placeholder{color:#fff}._login_pvck2_1 ._input-group_pvck2_24 input::placeholder{color:#fff}._login_pvck2_1 ._input-group_pvck2_24 ._code-text_pvck2_45{position:absolute;right:0;flex:1;display:block;width:2.50667rem;text-align:center;font-size:.37333rem;color:#fff;line-height:.8rem;height:.8rem}._login_pvck2_1 ._input-group_pvck2_24 .van-field__button{border-left:.05333rem solid #fff;margin-left:.32rem;margin-right:-.48rem}._login_pvck2_1 ._login-change_pvck2_62{padding-top:.21333rem;font-size:.37333rem;color:#fff;float:right;cursor:pointer}._login_pvck2_1 .van-button--disabled{opacity:1;color:rgba(0,0,0,.25)}\n",document.head.appendChild(K),{setters:[function(t){a=t.c,s=t.d,f=t.r,d=t.g,p=t.a,h=t.b,g=t.i,m=t.w,v=t.e,y=t.o,_=t.f,b=t.n,w=t.h,S=t.j,x=t.t,k=t.m,C=t.k,O=t.l,L=t.p,j=t.I,E=t.q,P=t.F,T=t.B,D=t.s,I=t.u,q=t.v,N=t.x,z=t.y,$=t.z,A=t.A,F=t.C,U=t.P,G=t.D,V=t.L,R=t.E,B=t.G,H=t.H,M=t.J,W=t.K,Y=t.M},function(t){J=t.F}],execute:function(){var n=l(a("image"),2),K=n[0],Q=n[1],X={src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:S,height:S,radius:S,lazyLoad:Boolean,iconSize:S,showError:x,errorIcon:k("photo-fail"),iconPrefix:String,showLoading:x,loadingIcon:k("photo")},Z=s({name:K,props:X,emits:["load","error"],setup:function(t,e){var n=e.emit,r=e.slots,o=f(!1),i=f(!0),a=f(),u=d().proxy.$Lazyload,c=p((function(){var e={width:h(t.width),height:h(t.height)};return g(t.radius)&&(e.overflow="hidden",e.borderRadius=h(t.radius)),e}));m((function(){return t.src}),(function(){o.value=!1,i.value=!0}));var l=function(t){i.value&&(i.value=!1,n("load",t))},s=function(){var t=new Event("load");Object.defineProperty(t,"target",{value:a.value,enumerable:!0}),l(t)},S=function(t){o.value=!0,i.value=!1,n("error",t)},x=function(e,n,r){return r?r():w(j,{name:e,size:t.iconSize,class:n,classPrefix:t.iconPrefix},null)},k=function(){if(!o.value&&t.src){var e={alt:t.alt,class:Q("img"),style:{objectFit:t.fit,objectPosition:t.position}};return t.lazyLoad?C(w("img",L({ref:a},e),null),[[O("lazy"),t.src]]):w("img",L({ref:a,src:t.src,onLoad:l,onError:S},e),null)}},E=function(t){var e=t.el,n=function(){e===a.value&&i.value&&s()};a.value?n():b(n)},P=function(t){t.el!==a.value||o.value||S()};return u&&v&&(u.$on("loaded",E),u.$on("error",P),y((function(){u.$off("loaded",E),u.$off("error",P)}))),_((function(){b((function(){var t;(null==(t=a.value)?void 0:t.complete)&&s()}))})),function(){var e;return w("div",{class:Q({round:t.round,block:t.block}),style:c.value},[k(),i.value&&t.showLoading?w("div",{class:Q("loading")},[x(t.loadingIcon,Q("loading-icon"),r.loading)]):o.value&&t.showError?w("div",{class:Q("error")},[x(t.errorIcon,Q("error-icon"),r.error)]):void 0,null==(e=r.default)?void 0:e.call(r)])}}}),tt=E(Z),et=l(a("cell-group"),2),nt=et[0],rt=et[1],ot={title:String,inset:Boolean,border:x},it=s({name:nt,inheritAttrs:!1,props:ot,setup:function(t,e){var n=e.slots,r=e.attrs,o=function(){var e;return w("div",L({class:[rt({inset:t.inset}),c({},T,t.border&&!t.inset)]},r),[null==(e=n.default)?void 0:e.call(n)])};return function(){return t.title||n.title?w(P,null,[w("div",{class:rt("title",{inset:t.inset})},[n.title?n.title():t.title]),o()]):o()}}}),at=E(it),ut=l(a("row"),2),ct=ut[0],lt=ut[1],st=Symbol(ct),ft={tag:k("div"),wrap:x,align:String,gutter:D(0),justify:String},dt=s({name:ct,props:ft,setup:function(t,e){var n=e.slots,r=I(st),o=r.children,i=r.linkChildren,a=p((function(){var t=[[]],e=0;return o.forEach((function(n,r){(e+=Number(n.span))>24?(t.push([r]),e-=24):t[t.length-1].push(r)})),t}));return i({spaces:p((function(){var e=Number(t.gutter),n=[];return e?(a.value.forEach((function(t){var r=e*(t.length-1)/t.length;t.forEach((function(t,o){if(0===o)n.push({right:r});else{var i=e-n[t-1].right,a=r-i;n.push({left:i,right:a})}}))})),n):n}))}),function(){var e,r=t.tag,o=t.wrap,i=t.align,a=t.justify;return w(r,{class:lt((e={},c(e,"align-".concat(i),i),c(e,"justify-".concat(a),a),c(e,"nowrap",!o),e))},{default:function(){var t;return[null==(t=n.default)?void 0:t.call(n)]}})}}}),pt=l(a("col"),2),ht=pt[0],gt=pt[1],mt={tag:k("div"),span:D(0),offset:S},vt=s({name:ht,props:mt,setup:function(t,e){var n=e.slots,r=q(st),o=r.parent,i=r.index,a=p((function(){if(o){var t=o.spaces;if(t&&t.value&&t.value[i.value]){var e=t.value[i.value],n=e.left,r=e.right;return{paddingLeft:n?"".concat(n,"px"):null,paddingRight:r?"".concat(r,"px"):null}}}}));return function(){var e,r=t.tag,o=t.span,i=t.offset;return w(r,{style:a.value,class:gt((e={},c(e,o,o),c(e,"offset-".concat(i),i),e))},{default:function(){var t;return[null==(t=n.default)?void 0:t.call(n)]}})}}}),yt=E(vt);var _t=l(a("count-down"),2),bt=_t[0],wt=_t[1],St={time:D(0),format:k("HH:mm:ss"),autoStart:x,millisecond:Boolean},xt=s({name:bt,props:St,emits:["change","finish"],setup:function(t,e){var n=e.emit,r=e.slots,o=z({time:+t.time,millisecond:t.millisecond,onChange:function(t){return n("change",t)},onFinish:function(){return n("finish")}}),i=o.start,a=o.pause,u=o.reset,c=o.current,l=p((function(){return function(t,e){var n=e.days,r=e.hours,o=e.minutes,i=e.seconds,a=e.milliseconds;if(t.includes("DD")?t=t.replace("DD",N(n)):r+=24*n,t.includes("HH")?t=t.replace("HH",N(r)):o+=60*r,t.includes("mm")?t=t.replace("mm",N(o)):i+=60*o,t.includes("ss")?t=t.replace("ss",N(i)):a+=1e3*i,t.includes("S")){var u=N(a,3);t=t.includes("SSS")?t.replace("SSS",u):t.includes("SS")?t.replace("SS",u.slice(0,2)):t.replace("S",u.charAt(0))}return t}(t.format,c.value)})),s=function(){u(+t.time),t.autoStart&&i()};return m((function(){return t.time}),s,{immediate:!0}),$({start:i,pause:a,reset:s}),function(){return w("div",{role:"timer",class:wt()},[r.default?r.default(c.value):l.value])}}}),kt=E(xt),Ct=E(dt),Ot="_imgCode_mq980_1",Lt="_codeTitle_mq980_4",jt="_img_mq980_1",Et="_imgChange_mq980_16",Pt="_field_mq980_23",Tt="_imgCodePopup_mq980_27",Dt=s({name:"o-img-code",props:{value:Boolean,phone:[String,Number],type:{type:String,default:"LOGIN"}},emits:["close","sendCode"],data:function(){return{isSuffix:"/api-web",showStatus:!1,identifyingCode:window.location.origin+"/api-web/code/getLoginImage?phone="+this.phone,code:""}},mounted:function(){this.showStatus=this.value},watch:{value:function(t){this.showStatus=t},code:function(t){t.length>=4&&this.checkVerifyLoginImage()}},methods:{updateIdentifyingCode:function(){var t=this;return u(i().mark((function e(){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=window.location.origin,t.identifyingCode="".concat(n,"/api-web/code/getLoginImage?phone=").concat(t.phone,"&token=").concat(Math.random());case 2:case"end":return e.stop()}}),e)})))()},checkVerifyLoginImage:function(){var t=this;return u(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(t.code.length<4)){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,A.post("".concat(t.isSuffix,"/code/verifyLoginImage"),{requestType:"form",hideLoading:!0,data:{phone:t.phone,code:t.code}});case 5:return e.next=7,A.post("".concat(t.isSuffix,"/code/sendSms"),{requestType:"form",hideLoading:!0,data:{mobile:t.phone}});case 7:setTimeout((function(){F("验证码已发送")}),100),t.$emit("close"),t.$emit("sendCode"),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),t.code="",t.updateIdentifyingCode();case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))()}},render:function(){var t=this;return w(U,{show:this.showStatus,class:Tt,closeOnClickOverlay:!1,onClose:function(){t.$emit("close")},closeable:!0,closeIcon:"close"},{default:function(){return[w("div",{class:Ot},[w("p",{class:Lt},[G("输入图形验证码")]),w(Ct,null,{default:function(){return[w(yt,{span:"14"},{default:function(){return[w(J,{placeholder:"请输入验证码",modelValue:t.code,"onUpdate:modelValue":function(e){return t.code=e},class:Pt},null)]}}),w(yt,{span:"10",class:jt},{default:function(){return[w(tt,{src:t.identifyingCode,onClick:function(){return t.updateIdentifyingCode()}},{loading:function(){return w(V,{type:"spinner",size:"20"},null)}})]}})]}}),w(Ct,{style:{display:"flex",justifyContent:"end"}},{default:function(){return[w(yt,{span:"10"},{default:function(){return[w("span",{class:Et,onClick:function(){return t.updateIdentifyingCode()}},[G("看不清?换一换")])]}})]}})])]}})}}),It={login:"_login_pvck2_1",codeText:"_codeText_pvck2_6",logo:"_logo_pvck2_9",container:"_container_pvck2_21","input-group":"_input-group_pvck2_24","code-text":"_code-text_pvck2_45","login-change":"_login-change_pvck2_62"};t("default",s({name:"layout-login",data:function(){return{loginType:"SMS",username:"",password:"",smsCode:"",countDownStatus:!0,countDownTime:12e4,imgCodeStatus:!1}},computed:{codeDisable:function(){var t=!0;return"PWD"===this.loginType?this.username&&this.password&&(t=!1):this.username&&this.smsCode&&(t=!1),t}},mounted:function(){R(),this.directNext()},methods:{directNext:function(){if("login"===B.user.status||"error"===B.user.status){var t=this.$route.query,n=t.returnUrl,i=(t.isRegister,o(t,e));this.$router.replace({path:n,query:r({},i)})}},onLogin:function(){var t=this;return u(i().mark((function e(){var n,o,a,u,c,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n={phone:t.username,clientId:"EDUCATION",clientSecret:"EDUCATION"},"PWD"!==t.loginType){e.next=12;break}return n.password=t.password,n.grant_type="password",e.next=7,A.post("/api-auth/usernameLogin",{requestType:"form",data:r({},n)});case 7:o=e.sent,a=o.data,H(a.authentication.token_type+" "+a.authentication.access_token),e.next=18;break;case 12:return n.smsCode=t.smsCode,e.next=15,A.post("/api-auth/smsLogin",{requestType:"form",data:r({},n)});case 15:u=e.sent,c=u.data,H(c.authentication.token_type+" "+c.authentication.access_token);case 18:return e.next=20,A.get("/api-web/schoolStaff/queryUserInfo",{initRequest:!0});case 20:l=e.sent,M(l.data),t.directNext(),e.next=27;break;case 25:e.prev=25,e.t0=e.catch(0);case 27:case"end":return e.stop()}}),e,null,[[0,25]])})))()},onSendCode:function(){var t=this;return u(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(W(t.username)){e.next=2;break}return e.abrupt("return",F("请输入正确的手机号码"));case 2:t.imgCodeStatus=!0;case 3:case"end":return e.stop()}}),e)})))()},onCodeSend:function(){var t=this;this.countDownStatus=!1,this.$nextTick((function(){t.$refs.countDownRef.start()}))},onFinished:function(){this.countDownStatus=!0,this.$refs.countDownRef.reset()},onChange:function(){"PWD"===this.loginType?this.loginType="SMS":"SMS"===this.loginType&&(this.loginType="PWD")}},render:function(){var t=this;return w("div",{class:[It.login]},[w("div",{class:It.logo},null),w(at,{class:It.container,border:!1},{default:function(){return[w(J,{modelValue:t.username,"onUpdate:modelValue":function(e){return t.username=e},name:"手机号",placeholder:"请输入您的手机号",type:"tel",class:It["input-group"],maxlength:11},null),"PWD"===t.loginType?w(J,{modelValue:t.password,"onUpdate:modelValue":function(e){return t.password=e},type:"password",name:"密码",class:It["input-group"],placeholder:"请输入密码"},null):w(J,{modelValue:t.smsCode,"onUpdate:modelValue":function(e){return t.smsCode=e},name:"验证码",placeholder:"请输入验证码",type:"tel",class:It["input-group"],maxlength:6},{button:function(){return t.countDownStatus?w("span",{class:It.codeText,onClick:t.onSendCode},[G("获取验证码")]):w(kt,{ref:"countDownRef","auto-start":!1,time:t.countDownTime,onFinish:t.onFinished,format:"ss秒"},null)}})]}}),w("div",{class:It.margin34},[w(Y,{round:!0,block:!0,disabled:this.codeDisable,onClick:this.onLogin},{default:function(){return[G("提交")]}}),w("span",{class:It["login-change"],onClick:this.onChange},["PWD"===this.loginType?"验证码登录":"密码登录"])]),this.imgCodeStatus?w(Dt,{value:this.imgCodeStatus,"onUpdate:value":function(e){return t.imgCodeStatus=e},phone:this.username,onClose:function(){t.imgCodeStatus=!1},onSendCode:this.onCodeSend},null):null])}}))}}}))}();