index-legacy-e4f99f3c.js 3.0 KB

1
  1. System.register(["./index-legacy-bfebbbb9.js","./index-legacy-8ff9361b.js","./index-legacy-c562a227.js","./index-legacy-0230da5d.js"],(function(e,t){"use strict";var i,o,n,d,s,a,l,m,c,p,r;return{setters:[e=>{i=e.d,o=e.D,n=e.E,d=e.a,s=e.V,a=e.A,l=e.L},e=>{m=e.R,c=e.C},e=>{p=e.F},e=>{r=e.I}],execute:function(){var t=document.createElement("style");t.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}\n",document.head.appendChild(t);const g="_imgCode_mq980_1",u="_codeTitle_mq980_4",h="_img_mq980_1",_="_imgChange_mq980_16",f="_field_mq980_23",y="_imgCodePopup_mq980_27";e("M",i({name:"o-img-code",props:{value:Boolean,phone:[String,Number],type:{type:String,default:"LOGIN"},clientId:{type:String,default:"cooleshow-student"}},emits:["close","sendCode"],data:()=>({isSuffix:"/edu-app",showStatus:!1,identifyingCode:null,code:""}),mounted(){this.showStatus=this.value,this.sendImgCode()},watch:{value(e){this.showStatus=e},code(e){e.length>=4&&this.checkVerifyLoginImage()}},methods:{async sendImgCode(){const{data:e}=await o.get(this.isSuffix+"/open/sendImgCode",{requestType:"form",hideLoading:!0,params:{phone:this.phone}});this.identifyingCode=e},async updateIdentifyingCode(){this.sendImgCode()},async checkVerifyLoginImage(){try{if(this.code.length<4)return;await o.post("/edu-app/open/verifyImgCode",{requestType:"form",hideLoading:!0,data:{phone:this.phone,code:this.code}}),await o.post("/edu-app/open/sendSms",{requestType:"form",hideLoading:!0,data:{clientId:this.clientId,type:"REGISTER",mobile:this.phone}}),setTimeout((()=>{n("验证码已发送")}),100),this.$emit("close"),this.$emit("sendCode")}catch{this.code="",setTimeout((()=>{this.updateIdentifyingCode()}),500)}}},render(){return d(s,{show:this.showStatus,class:y,closeOnClickOverlay:!1,onClose:()=>{this.$emit("close")},closeable:!0,closeIcon:"close"},{default:()=>[d("div",{class:g},[d("p",{class:u},[a("输入图形验证码")]),d(m,null,{default:()=>[d(c,{span:"14"},{default:()=>[d(p,{placeholder:"请输入验证码",modelValue:this.code,"onUpdate:modelValue":e=>this.code=e,class:f,autocomplete:"off"},null)]}),d(c,{span:"10",class:h},{default:()=>[d(r,{src:this.identifyingCode,onClick:()=>this.updateIdentifyingCode()},{loading:()=>d(l,{type:"spinner",size:"20"},null)})]})]}),d(m,{style:{display:"flex",justifyContent:"end"}},{default:()=>[d(c,{span:"10"},{default:()=>[d("span",{class:_,onClick:()=>this.updateIdentifyingCode()},[a("看不清?换一换")])]})]})])]})}}))}}}));