index-legacy.456f79ed.js 4.0 KB

1
  1. !function(){function e(e,n,t,o,i,r,a){try{var c=e[r](a),u=c.value}catch(d){return void t(d)}c.done?n(u):Promise.resolve(u).then(o,i)}function n(n){return function(){var t=this,o=arguments;return new Promise((function(i,r){var a=n.apply(t,o);function c(n){e(a,i,r,c,u,"next",n)}function u(n){e(a,i,r,c,u,"throw",n)}c(void 0)}))}}var t=document.createElement("style");t.innerHTML="._imgCode_w5vq4_1{padding:.42667rem}._imgCode_w5vq4_1 ._codeTitle_w5vq4_4{text-align:center;font-size:.42667rem;color:#4f4f4f;margin:0;padding-bottom:.42667rem}._imgCode_w5vq4_1 ._img_w5vq4_1{display:flex;align-items:center;justify-content:center}._imgCode_w5vq4_1 ._imgChange_w5vq4_16{display:block;color:#aaa;font-size:.32rem;text-align:center;padding-top:.13333rem}._imgCode_w5vq4_1 ._field_w5vq4_23{background:#F4F4F4;padding:.26667rem .32rem!important}._imgCodePopup_w5vq4_27{width:90%;border-radius:.13333rem;overflow:initial}._imgCodePopup_w5vq4_27 .van-popup__close-icon{top:-.98667rem!important;right:0!important;font-size:.66667rem;color:#fff}\n",document.head.appendChild(t),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.f8f0c467.js","./index-legacy.4a75d877.js","./index-legacy.610f0a70.js","./index-legacy.78ce4f6b.js"],(function(e){"use strict";var t,o,i,r,a,c,u,d,s,f,l,p;return{setters:[function(e){t=e.d,o=e.g,i=e.y,r=e.T,a=e.j,c=e.aS,u=e.A,d=e.aT},function(e){s=e.R,f=e.C},function(e){l=e.I},function(){},function(e){p=e.F}],execute:function(){var g="_imgCode_w5vq4_1",m="_codeTitle_w5vq4_4",_="_img_w5vq4_1",v="_imgChange_w5vq4_16",h="_field_w5vq4_23",w="_imgCodePopup_w5vq4_27";e("I",t({name:"imgCode",props:{value:Boolean,phone:[String,Number],onClose:{type:Function,default:function(){}},registerType:{type:String,default:"LOGIN"},onSendCode:{type:Function,default:function(){}}},data:function(){var e=window.location.origin,n="STUDENT"===o.platformType?"/api-student":"/api-teacher";return{isSuffix:n,showStatus:!1,identifyingCode:e+n+"/code/getImageCode?phone="+this.phone,code:null}},mounted:function(){this.showStatus=this.value},watch:{value:function(e){this.showStatus=e},code:function(e){e.length>=4&&this.checkVerifyLoginImage()}},methods:{updateIdentifyingCode:function(){var e=this;return n(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=window.location.origin,e.identifyingCode="".concat(t).concat(e.isSuffix,"/code/getImageCode?phone=").concat(e.phone,"&token=").concat(Math.random());case 2:case"end":return n.stop()}}),n)})))()},checkVerifyLoginImage:function(){var e=this;return n(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!(e.code.length<4)){n.next=3;break}return n.abrupt("return");case 3:return n.next=5,i.post("".concat(e.isSuffix,"/code/sendSmsCode"),{requestType:"form",data:{mobile:e.phone,type:e.registerType,code:e.code}});case 5:r("验证码已发送"),e.onClose(),e.onSendCode(),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(0),e.updateIdentifyingCode();case 13:case"end":return n.stop()}}),n,null,[[0,10]])})))()}},render:function(){var e=this;return a(c,{show:this.showStatus,class:w,closeOnClickOverlay:!1,onClose:function(){e.onClose()},closeable:!0,closeIcon:"close"},{default:function(){return[a("div",{class:g},[a("p",{class:m},[u("输入图形验证码")]),a(s,null,{default:function(){return[a(f,{span:"14"},{default:function(){return[a(p,{placeholder:"请输入验证码",modelValue:e.code,"onUpdate:modelValue":function(n){return e.code=n},class:h,maxlength:"4",autocomplete:"off"},null)]}}),a(f,{span:"10",class:_},{default:function(){return[a(l,{src:e.identifyingCode,onClick:function(){return e.updateIdentifyingCode()}},{loading:function(){return a(d,{type:"spinner",size:"20"},null)}})]}})]}}),a(s,{style:{display:"flex",justifyContent:"end"}},{default:function(){return[a(f,{span:"10"},{default:function(){return[a("span",{class:v,onClick:function(){return e.updateIdentifyingCode()}},[u("看不清?换一换")])]}})]}})])]}})}}))}}}))}();