validate-legacy.6cdb2ccf.js 6.9 KB

1
  1. !function(){function e(e,n,t,r,o,i,a){try{var u=e[i](a),c=u.value}catch(l){return void t(l)}u.done?n(c):Promise.resolve(c).then(r,o)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=n.apply(t,r);function u(n){e(a,o,i,u,c,"next",n)}function c(n){e(a,o,i,u,c,"throw",n)}u(void 0)}))}}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return o(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,n)}(e,n)||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 o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var i=document.createElement("style");i.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(i),System.register(["./index-legacy.90c82f08.js","./index-legacy.3c5580aa.js","./index-legacy.eb4bc59e.js"],(function(e){"use strict";var o,i,a,u,c,l,s,f,d,p,m,g,h,v,y,_,C,b,w;return{setters:[function(e){o=e.t,i=e.u,a=e.v,u=e.w,c=e.d,l=e.x,s=e.y,f=e.c,d=e.z,p=e.C,m=e.D,g=e.g,h=e.m,v=e.o,y=e.P,_=e.q,C=e.L},function(e){b=e.F},function(e){w=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)}));var x=r(o("row"),2),S=x[0],q=x[1],I=Symbol(S),k={tag:i("div"),wrap:a,align:String,gutter:u(0),justify:String},j=c({name:S,props:k,setup:function(e,n){var r=n.slots,o=l(I),i=o.children,a=o.linkChildren,u=s((function(){var e=[[]],n=0;return i.forEach((function(t,r){(n+=Number(t.span))>24?(e.push([r]),n-=24):e[e.length-1].push(r)})),e}));return a({spaces:s((function(){var n=Number(e.gutter),t=[];return n?(u.value.forEach((function(e){var r=n*(e.length-1)/e.length;e.forEach((function(e,o){if(0===o)t.push({right:r});else{var i=n-t[e-1].right,a=r-i;t.push({left:i,right:a})}}))})),t):t}))}),function(){var n,o=e.tag,i=e.wrap,a=e.align,u=e.justify;return f(o,{class:q((n={},t(n,"align-".concat(a),a),t(n,"justify-".concat(u),u),t(n,"nowrap",!i),n))},{default:function(){var e;return[null==(e=r.default)?void 0:e.call(r)]}})}}}),T=r(o("col"),2),L=T[0],R=T[1],A={tag:i("div"),span:u(0),offset:d},P=c({name:L,props:A,setup:function(e,n){var r=n.slots,o=p(I),i=o.parent,a=o.index,u=s((function(){if(i){var e=i.spaces;if(e&&e.value&&e.value[a.value]){var n=e.value[a.value],t=n.left,r=n.right;return{paddingLeft:t?"".concat(t,"px"):null,paddingRight:r?"".concat(r,"px"):null}}}}));return function(){var n,o=e.tag,i=e.span,a=e.offset;return f(o,{style:u.value,class:R((n={},t(n,i,i),t(n,"offset-".concat(a),a),n))},{default:function(){var e;return[null==(e=r.default)?void 0:e.call(r)]}})}}}),O=e("C",m(P)),z=e("R",m(j)),E="_imgCode_mq980_1",N="_codeTitle_mq980_4",V="_img_mq980_1",F="_imgChange_mq980_16",M="_field_mq980_23",U="_imgCodePopup_mq980_27";e("I",c({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:g.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,r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h.get(e.isSuffix+"/open/sendImgCode",{requestType:"form",hideLoading:!0,params:{phone:e.phone}});case 2:t=n.sent,r=t.data,e.identifyingCode=r;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,h.post("".concat(e.isSuffix,"/open/verifyImgCode"),{requestType:"form",hideLoading:!0,data:{phone:e.phone,code:e.code}});case 5:return console.log(g.clientId,g.platformType),n.next=8,h.post("".concat(e.isSuffix,"/open/sendSms"),{requestType:"form",hideLoading:!0,data:{mobile:e.phone,type:e.type,clientId:g.clientId[g.platformType]}});case 8:setTimeout((function(){v("验证码已发送")}),100),e.onClose(),e.onSendCode(),n.next=16;break;case 13:n.prev=13,n.t0=n.catch(0),e.updateIdentifyingCode();case 16:case"end":return n.stop()}}),n,null,[[0,13]])})))()}},render:function(){var e=this;return f(y,{show:this.showStatus,class:U,closeOnClickOverlay:!1,onClose:function(){e.onClose()},closeable:!0,closeIcon:"close"},{default:function(){return[f("div",{class:E},[f("p",{class:N},[_("输入图形验证码")]),f(z,null,{default:function(){return[f(O,{span:"14"},{default:function(){return[f(b,{placeholder:"请输入验证码",modelValue:e.code,"onUpdate:modelValue":function(n){return e.code=n},class:M},null)]}}),f(O,{span:"10",class:V},{default:function(){return[f(w,{src:e.identifyingCode,onClick:function(){return e.updateIdentifyingCode()}},{loading:function(){return f(C,{type:"spinner",size:"20"},null)}})]}})]}}),f(z,{style:{display:"flex",justifyContent:"end"}},{default:function(){return[f(O,{span:"10"},{default:function(){return[f("span",{class:F,onClick:function(){return e.updateIdentifyingCode()}},[_("看不清?换一换")])]}})]}})])]}})}}))}}}))}();