index-legacy.1c659b2a.js 4.1 KB

1
  1. !function(){function e(e,n,t,o,i,r,a){try{var u=e[r](a),c=u.value}catch(d){return void t(d)}u.done?n(c):Promise.resolve(c).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 u(n){e(a,i,r,u,c,"next",n)}function c(n){e(a,i,r,u,c,"throw",n)}u(void 0)}))}}var t=document.createElement("style");t.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(t),System.register(["./index-legacy.5f9666b4.js","./index-legacy.81882747.js","./index-legacy.b6ba0003.js","./index-legacy.892caf3d.js"],(function(e){"use strict";var t,o,i,r,a,u,c,d,s,f,l,m;return{setters:[function(e){t=e.d,o=e.g,i=e.m,r=e.o,a=e.c,u=e.P,c=e.q,d=e.L},function(e){s=e.R,f=e.C},function(e){l=e.F},function(e){m=e.I}],execute:function(){var p="_imgCode_mq980_1",g="_codeTitle_mq980_4",_="_img_mq980_1",h="_imgChange_mq980_16",y="_field_mq980_23",C="_imgCodePopup_mq980_27";e("I",t({name:"o-img-code",props:{value:Boolean,phone:[String,Number],onClose:{type:Function,default:function(){}},onSendCode:{type:Function,default:function(){}},type:{type:String,default:"LOGIN"}},data:function(){return{isSuffix:o.platformApi,showStatus:!1,identifyingCode:null,code:null}},mounted:function(){this.showStatus=this.value,this.sendImgCode()},watch:{value:function(e){this.showStatus=e},code:function(e){e.length>=4&&this.checkVerifyLoginImage()}},methods:{sendImgCode:function(){var e=this;return n(regeneratorRuntime.mark((function n(){var t,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.get(e.isSuffix+"/open/sendImgCode",{requestType:"form",hideLoading:!0,params:{phone:e.phone}});case 2:t=n.sent,o=t.data,e.identifyingCode=o;case 5:case"end":return n.stop()}}),n)})))()},updateIdentifyingCode:function(){var e=this;return n(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e.sendImgCode();case 1: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,"/open/sendSmsVerify"),{requestType:"form",hideLoading:!0,data:{mobile:e.phone,type:e.type,code:e.code,clientId:o.clientId[o.platformType]}});case 5:setTimeout((function(){r("验证码已发送")}),100),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(u,{show:this.showStatus,class:C,closeOnClickOverlay:!1,onClose:function(){e.onClose()},closeable:!0,closeIcon:"close"},{default:function(){return[a("div",{class:p},[a("p",{class:g},[c("输入图形验证码")]),a(s,null,{default:function(){return[a(f,{span:"14"},{default:function(){return[a(l,{placeholder:"请输入验证码",modelValue:e.code,"onUpdate:modelValue":function(n){return e.code=n},class:y,maxlength:4},null)]}}),a(f,{span:"10",class:_},{default:function(){return[a(m,{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:h,onClick:function(){return e.updateIdentifyingCode()}},[c("看不清?换一换")])]}})]}})])]}})}}))}}}))}();