index-legacy.1acb4fd1.js 6.1 KB

1234
  1. ;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML=":root{--van-count-down-text-color: var(--van-text-color);--van-count-down-font-size: var(--van-font-size-md);--van-count-down-line-height: var(--van-line-height-md)}.van-count-down{color:var(--van-count-down-text-color);font-size:var(--van-count-down-font-size);line-height:var(--van-count-down-line-height)}._imgCode_mywmt_1{padding:.42667rem}._imgCode_mywmt_1 ._codeTitle_mywmt_4{text-align:center;font-size:.42667rem;color:#4f4f4f;margin:0;padding-bottom:.42667rem}._imgCode_mywmt_1 ._img_mywmt_1{display:flex;align-items:center;justify-content:center}._imgCode_mywmt_1 ._imgChange_mywmt_16{display:block;color:#aaa;font-size:.32rem;text-align:center;padding-top:.13333rem}._imgCode_mywmt_1 ._field_mywmt_23{background:#F4F4F4;padding:.26667rem .32rem!important}._imgCodePopup_mywmt_27{width:90%;border-radius:.13333rem;overflow:inherit}._imgCodePopup_mywmt_27 .van-popup__close-icon{top:-.98667rem!important;right:0!important;font-size:.66667rem;color:#fff}\n";document.head.appendChild(__vite_style__);System.register(['./vendor-legacy.09f20d09.js','./index-legacy.637f35563.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a5.js','./index-legacy.595c24c3.js'],function(exports){'use strict';var defineComponent,Toast,createVNode,Popup,createTextVNode,Row,Col,Field,Image,Loading,state,request;return{setters:[function(module){defineComponent=module.d;Toast=module.T;createVNode=module.a;Popup=module.P;createTextVNode=module.j;Row=module.z;Col=module.A;Field=module.G;Image=module.I;Loading=module.L;},function(){},function(){},function(){},function(){},function(module){state=module.s;request=module.r;}],execute:function execute(){var index='';var imgCode="_imgCode_mywmt_1";var codeTitle="_codeTitle_mywmt_4";var img="_img_mywmt_1";var imgChange="_imgChange_mywmt_16";var field="_field_mywmt_23";var imgCodePopup="_imgCodePopup_mywmt_27";var styles={imgCode:imgCode,codeTitle:codeTitle,img:img,imgChange:imgChange,field:field,imgCodePopup:imgCodePopup};var ImgCode=exports('I',defineComponent({name:'imgCode',props:{value:Boolean,phone:[String,Number],onClose:{type:Function,// (...args: any[]) => any) | undefined
  2. default:function _default(){}},onSendCode:{type:Function,default:function _default(){}}},data:function data(){var origin=window.location.origin;var suffix=state.platformType==='STUDENT'?'/api-student':'/api-teacher';return{isSuffix:suffix,showStatus:false,identifyingCode:origin+suffix+'/code/getImageCode?phone='+this.phone,code:null};},mounted:function mounted(){this.showStatus=this.value;},watch:{value:function value(val){this.showStatus=val;},code:function code(val){if(val.length>=4){this.checkVerifyLoginImage();}}},methods:{updateIdentifyingCode:function updateIdentifyingCode(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var origin;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:// 刷新token
  3. origin=window.location.origin;_this.identifyingCode="".concat(origin).concat(_this.isSuffix,"/code/getImageCode?phone=").concat(_this.phone,"&token=").concat(Math.random());case 2:case"end":return _context.stop();}}},_callee);}))();},checkVerifyLoginImage:function checkVerifyLoginImage(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;if(!(_this2.code.length<4)){_context2.next=3;break;}return _context2.abrupt("return");case 3:_context2.next=5;return request.post("".concat(_this2.isSuffix,"/code/verifyImageCode"),{requestType:'form',data:{phone:_this2.phone,code:_this2.code}});case 5:_context2.next=7;return request.post("".concat(_this2.isSuffix,"/code/sendSmsCode"),{requestType:'form',data:{mobile:_this2.phone,type:'LOGIN'}});case 7:Toast('验证码已发送');_this2.onClose();_this2.onSendCode();_context2.next=15;break;case 12:_context2.prev=12;_context2.t0=_context2["catch"](0);_this2.updateIdentifyingCode();case 15:case"end":return _context2.stop();}}},_callee2,null,[[0,12]]);}))();}},render:function render(){var _this3=this;return(// @ts-ignore
  4. createVNode(Popup,{"show":this.showStatus,"class":styles.imgCodePopup,"closeOnClickOverlay":false,"onClose":function onClose(){_this3.onClose();},"closeable":true,"closeIcon":"close"},{default:function _default(){return[createVNode("div",{"class":styles.imgCode},[createVNode("p",{"class":styles.codeTitle},[createTextVNode("\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u7801")]),createVNode(Row,null,{default:function _default(){return[createVNode(Col,{"span":"14"},{default:function _default(){return[createVNode(Field,{"placeholder":"请输入验证码","modelValue":_this3.code,"onUpdate:modelValue":function onUpdateModelValue($event){return _this3.code=$event;},"class":styles.field},null)];}}),createVNode(Col,{"span":"10","class":styles.img},{default:function _default(){return[createVNode(Image,{"src":_this3.identifyingCode,"onClick":function onClick(){return _this3.updateIdentifyingCode();}},{loading:function loading(){return createVNode(Loading,{"type":"spinner","size":"20"},null);}})];}})];}}),createVNode(Row,{"style":{display:'flex',justifyContent:'end'}},{default:function _default(){return[createVNode(Col,{"span":"10"},{default:function _default(){return[createVNode("span",{"class":styles.imgChange,"onClick":function onClick(){return _this3.updateIdentifyingCode();}},[createTextVNode("\u770B\u4E0D\u6E05\uFF1F\u6362\u4E00\u6362")])];}})];}})])];}}));}}));}};});})();