1 |
- !function(){var e=["returnUrl","isRegister"];function t(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,o)}function n(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function u(e){t(a,o,i,u,s,"next",e)}function s(e){t(a,o,i,u,s,"throw",e)}u(void 0)}))}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=document.createElement("style");u.innerHTML="._login_1qk49_1{min-height:100vh;background:url(./assets/top_bg.e8f7f58b.png) no-repeat top center,url(./assets/bottom_bg.2d0f4251.png) no-repeat bottom center;background-color:#fff;background-size:100%}._login_1qk49_1 ._loginTitle_1qk49_7{padding-top:2.66667rem;font-size:.69333rem;padding-left:.93333rem;padding-bottom:1.86667rem;line-height:.98667rem;font-weight:500}._login_1qk49_1 ._codeText_1qk49_15{color:var(--van-primary)}._login_1qk49_1 ._margin34_1qk49_18{margin:0 .90667rem}._login_1qk49_1 ._formTitle_1qk49_21{font-size:.48rem;color:#000;font-weight:500}._login_1qk49_1 .van-cell-group{margin-bottom:.93333rem}._login_1qk49_1 .van-field{padding-left:0;padding-right:0}._login_1qk49_1 .van-button+.van-button{margin-top:.53333rem;color:#000!important}\n",document.head.appendChild(u),System.register(["./index-legacy.fba2875c.js","./index-legacy.f231f1c5.js","./index-legacy.7dcec7b3.js","./index-legacy.8921f068.js","./index-legacy.168f0d2b.js","./index-legacy.fc77fe4f.js","./validate-legacy.c1df5f0e.js","./index-legacy.ec32ced6.js","./index-legacy.e7460ea1.js","./use-id-legacy.db87b112.js","./index-legacy.d92f7da7.js","./auth-legacy.0b00e81c.js","./routes-common-legacy.6845df4a.js","./index-legacy.40eca993.js","./use-height-legacy.233a2ec8.js"],(function(t){"use strict";var r,i,u,s,c,l,d,f,g,m,p,h,b,_,y,v,k,j;return{setters:[function(e){r=e.d,i=e.h,u=e.g,s=e.t,c=e.i,l=e.T,d=e.j,f=e.z,g=e.B},function(e){m=e.C},function(){},function(e){p=e.F},function(e){h=e.C,b=e.I},function(e){_=e.R,y=e.C},function(e){v=e.c},function(e){k=e.a},function(e){j=e.C},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var x="_login_1qk49_1",w="_loginTitle_1qk49_7",C="_codeText_1qk49_15",O="_margin34_1qk49_18",q="_formTitle_1qk49_21";t("default",r({name:"login",data:function(){return{username:"",password:"",smsCode:"",countDownStatus:!0,countDownTime:12e4,countDownRef:null,imgCodeStatus:!1}},computed:{codeDisable:function(){var e=!0;return this.username&&this.smsCode&&(e=!1),e}},mounted:function(){i(),this.directNext()},methods:{directNext:function(){if("login"===u.user.status||"error"===u.user.status){var t=this.$route.query,n=(t.returnUrl,t.isRegister,a(t,e));this.$router.replace({path:"/home",query:o({},n)})}},onLogin:function(){var e=this;return n(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:e.username,smsCode:e.smsCode,isSurportRegister:!0}});case 3:return n=t.sent,r=n.data.authentication,s(r.token_type+" "+r.access_token),postMessage({api:"setCache",content:{key:"h5-colexiu-token",value:r.token_type+" "+r.access_token}}),t.next=9,k.get("/api-student/student/queryUserInfo",{initRequest:!0});case 9:o=t.sent,c(o.data),postMessage({api:"bindUserAccount",content:{phone:e.username}}),e.directNext(),t.next=17;break;case 15:t.prev=15,t.t0=t.catch(0);case 17:case"end":return t.stop()}}),t,null,[[0,15]])})))()},onSendCode:function(){var e=this;return n(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v(e.username)){t.next=2;break}return t.abrupt("return",l("请输入正确的手机号码"));case 2:e.imgCodeStatus=!0;case 3:case"end":return t.stop()}}),t)})))()},onCodeSend:function(){this.countDownStatus=!1,this.countDownRef.start()},onFinished:function(){this.countDownStatus=!0,this.countDownRef.reset()}},render:function(){var e=this;return d("div",{class:x},[d(j,{border:!1,background:"transparent",title:" ",isBack:!0},null),d("div",{class:w},[f("您好,"),d("br",null,null),f(" 欢迎使用酷乐秀")]),d(m,{class:O,border:!1},{default:function(){return[d(_,{style:{marginBottom:"16px"}},{default:function(){return[d(y,{span:24,class:q},{default:function(){return[f("手机号")]}}),d(y,{span:24,class:"van-hairline--bottom"},{default:function(){return[d(p,{modelValue:e.username,"onUpdate:modelValue":function(t){return e.username=t},name:"手机号",placeholder:"请输入您的手机号",type:"tel",maxlength:11},null)]}})]}}),d(_,null,{default:function(){return[d(y,{span:24,class:q},{default:function(){return[f("验证码")]}}),d(y,{span:24,class:"van-hairline--bottom"},{default:function(){return[d(p,{modelValue:e.smsCode,"onUpdate:modelValue":function(t){return e.smsCode=t},name:"验证码",placeholder:"请输入验证码",type:"tel",maxlength:6},{button:function(){return e.countDownStatus?d("span",{class:C,onClick:e.onSendCode},[f("获取验证码")]):d(h,{ref:e.countDownRef,"auto-start":!1,time:e.countDownTime,onFinish:e.onFinished,format:"ss秒"},null)}})]}})]}})]}}),d("div",{class:O},[d(g,{round:!0,block:!0,type:"primary",disabled:this.codeDisable,onClick:this.onLogin},{default:function(){return[f("登录")]}})]),this.imgCodeStatus?d(b,{value:this.imgCodeStatus,"onUpdate:value":function(t){return e.imgCodeStatus=t},phone:this.username,onClose:function(){e.imgCodeStatus=!1},onSendCode:this.onCodeSend},null):null])}}))}}}))}();
|