validate-legacy.717f2f9e.js 4.4 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML="._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(e),System.register(["./index-legacy.eb062188.js","./index-legacy.3a3e070a.js","./index-legacy.fecc738b.js"],(function(e){"use strict";var t,n,i,o,s,a,l,d,r,u,c,p,f,m,g,h,_,y,C;return{setters:[function(e){t=e.t,n=e.u,i=e.v,o=e.w,s=e.d,a=e.x,l=e.y,d=e.c,r=e.z,u=e.C,c=e.D,p=e.g,f=e.m,m=e.o,g=e.P,h=e.q,_=e.L},function(e){y=e.F},function(e){C=e.I}],execute:function(){e("c",(function(e){return/^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\d{8}$/.test(e)}));const[v,q]=t("row"),I=Symbol(v),S={tag:n("div"),wrap:i,align:String,gutter:o(0),justify:String};var w=s({name:v,props:S,setup(e,{slots:t}){const{children:n,linkChildren:i}=a(I),o=l((()=>{const e=[[]];let t=0;return n.forEach(((n,i)=>{t+=Number(n.span),t>24?(e.push([i]),t-=24):e[e.length-1].push(i)})),e}));return i({spaces:l((()=>{const t=Number(e.gutter),n=[];return t?(o.value.forEach((e=>{const i=t*(e.length-1)/e.length;e.forEach(((e,o)=>{if(0===o)n.push({right:i});else{const o=t-n[e-1].right,s=i-o;n.push({left:o,right:s})}}))})),n):n}))}),()=>{const{tag:n,wrap:i,align:o,justify:s}=e;return d(n,{class:q({[`align-${o}`]:o,[`justify-${s}`]:s,nowrap:!i})},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}}});const[x,b]=t("col"),L={tag:n("div"),span:o(0),offset:r};var T=s({name:x,props:L,setup(e,{slots:t}){const{parent:n,index:i}=u(I),o=l((()=>{if(!n)return;const{spaces:e}=n;if(e&&e.value&&e.value[i.value]){const{left:t,right:n}=e.value[i.value];return{paddingLeft:t?`${t}px`:null,paddingRight:n?`${n}px`:null}}}));return()=>{const{tag:n,span:i,offset:s}=e;return d(n,{style:o.value,class:b({[i]:i,[`offset-${s}`]:s})},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}}});const j=e("C",c(T)),k=e("R",c(w));var $="_imgCode_mq980_1",z="_codeTitle_mq980_4",E="_img_mq980_1",N="_imgChange_mq980_16",P="_field_mq980_23",V="_imgCodePopup_mq980_27";e("I",s({name:"o-img-code",props:{value:Boolean,phone:[String,Number],onClose:{type:Function,default:()=>{}},onSendCode:{type:Function,default:()=>{}},type:{type:String,default:"LOGIN"}},data:()=>({isSuffix:p.platformApi,showStatus:!1,identifyingCode:null,code:null}),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 f.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 f.post(`${this.isSuffix}/open/verifyImgCode`,{requestType:"form",hideLoading:!0,data:{phone:this.phone,code:this.code}}),console.log(p.clientId,p.platformType),await f.post(`${this.isSuffix}/open/sendSms`,{requestType:"form",hideLoading:!0,data:{mobile:this.phone,type:this.type,clientId:p.clientId[p.platformType]}}),setTimeout((()=>{m("验证码已发送")}),100),this.onClose(),this.onSendCode()}catch{this.updateIdentifyingCode()}}},render(){return d(g,{show:this.showStatus,class:V,closeOnClickOverlay:!1,onClose:()=>{this.onClose()},closeable:!0,closeIcon:"close"},{default:()=>[d("div",{class:$},[d("p",{class:z},[h("输入图形验证码")]),d(k,null,{default:()=>[d(j,{span:"14"},{default:()=>[d(y,{placeholder:"请输入验证码",modelValue:this.code,"onUpdate:modelValue":e=>this.code=e,class:P},null)]}),d(j,{span:"10",class:E},{default:()=>[d(C,{src:this.identifyingCode,onClick:()=>this.updateIdentifyingCode()},{loading:()=>d(_,{type:"spinner",size:"20"},null)})]})]}),d(k,{style:{display:"flex",justifyContent:"end"}},{default:()=>[d(j,{span:"10"},{default:()=>[d("span",{class:N,onClick:()=>this.updateIdentifyingCode()},[h("看不清?换一换")])]})]})])]})}}))}}}))}();