login-legacy.9ade0db9.js 14 KB

123456
  1. <<<<<<<< HEAD:dist/assets/login-legacy.9ade0db9.js
  2. !function(){var e=["returnUrl","isRegister"];function t(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 n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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}function i(e,t,n,r,o,i,s){try{var a=e[i](s),u=a.value}catch(c){return void n(c)}a.done?t(u):Promise.resolve(u).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var s=e.apply(t,n);function a(e){i(s,r,o,a,u,"next",e)}function u(e){i(s,r,o,a,u,"throw",e)}a(void 0)}))}}System.register(["./index-legacy.48c8d62c.js","./validate-legacy.0e436917.js","./index-legacy.c75fe8a2.js","./index-legacy.269a0b91.js","./index-legacy.55fe5b03.js","./index-legacy.5378722e.js","./index-legacy.0e0de364.js","./index-legacy.087e0425.js"],(function(t){"use strict";var r,i,a,u,c,l,p,d,f,h,g,m,y,w,b,v,x,S,C,O,P,j,D;return{setters:[function(e){r=e.d,i=e.bd,a=e.e,u=e.m,c=e.be,l=e.bf,p=e.f,d=e.s,f=e.n,h=e.o,g=e.c,m=e.bg,y=e.q,w=e.B,b=e.P},function(e){v=e.c,x=e.R,S=e.C,C=e.I},function(e){O=e.q},function(e){P=e.C},function(e){j=e.F},function(e){D=e.C},function(){},function(){}],execute:function(){t("default",r({name:"login-music",data:function(){return{loginType:"SMS",username:"",password:"",smsCode:"",countDownStatus:!0,countDownTime:12e4,imgCodeStatus:!1,showPopup:!1,showPopupMessage:"请使用微信打开",wxAppId:"",code:"",orchestraInfo:{},testIsWeixin:!1}},computed:{codeDisable:function(){var e=!0;return this.username&&this.smsCode&&(e=!1),e}},mounted:function(){i(),this.directNext(),a().weixin||this.testIsWeixin||(this.showPopup=!0),this.getDetails()},methods:{getDetails:function(){var e=this;return s(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.$route.query.id){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,u.get("/api-student/open/orchestra/detail/"+e.$route.query.id);case 6:n=t.sent,r=n.data,e.orchestraInfo=r||{},r.canSignUp||(e.showPopup=!0,e.showPopupMessage="学校已关闭"),t.next=14;break;case 12:t.prev=12,t.t0=t.catch(0);case 14:case"end":return t.stop()}}),t,null,[[0,12]])})))()},getAppIdAndCode:function(e){return s(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.get("/api-student/open/paramConfig/wechatAppId");case 3:n=t.sent,(r=n.data)&&(c(),l(r,e)),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})))()},directNext:function(){if("login"===p.user.status||"error"===p.user.status){var t=this.$route.query,r=t.returnUrl,i=(t.isRegister,o(t,e)),s=window.location.origin+window.location.pathname+"#"+r+"?"+O.stringify(n({},i));this.testIsWeixin?this.locationReplace(s):this.getAppIdAndCode(s)}},locationReplace:function(e){console.log(history.replaceState,"window.history.replaceState",e),history.replaceState?(history.replaceState(null,document.title,e),history.go(0)):location.replace(e)},onLogin:function(){var e=this;return s(regeneratorRuntime.mark((function t(){var r,o,i,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.orchestraInfo.canSignUp||(e.showPopup=!0,e.showPopupMessage="学校已关闭"),r={username:e.username,client_id:"jmedu-student",client_secret:"jmedu-student",autoRegister:!0,password:e.smsCode,loginType:"SMS",grant_type:"password"},t.next=5,u.post("/api-oauth/userlogin",{requestType:"form",data:n({},r)});case 5:return o=t.sent,i=o.data,d(i.token_type+" "+i.access_token),t.next=10,u.get("/api-student/user/getUserInfo",{initRequest:!0});case 10:s=t.sent,f(s.data),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 s(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",h("请输入正确的手机号码"));case 2:e.imgCodeStatus=!0;case 3:case"end":return t.stop()}}),t)})))()},onCodeSend:function(){var e=this;this.countDownStatus=!1,this.$nextTick((function(){e.$refs.countDownRef.start()}))},onFinished:function(){this.countDownStatus=!0,this.$refs.countDownRef.reset()},onChange:function(){"PWD"===this.loginType?this.loginType="SMS":"SMS"===this.loginType&&(this.loginType="PWD")}},render:function(){var e=this;return g("div",{class:m.login},[g("div",{class:m.loginTitle},[y("您好,"),g("br",null,null),y(" 欢迎使用管乐团学生端")]),g(P,{class:m.margin34,border:!1},{default:function(){return[g(x,{style:{marginBottom:"16px"}},{default:function(){return[g(S,{span:24,class:m.formTitle},{default:function(){return[y("手机号")]}}),g(S,{span:24,class:"van-hairline--bottom"},{default:function(){return[g(j,{modelValue:e.username,"onUpdate:modelValue":function(t){return e.username=t},name:"手机号",placeholder:"请输入您的手机号",type:"tel",maxlength:11},null)]}})]}}),g(x,null,{default:function(){return[g(S,{span:24,class:m.formTitle},{default:function(){return[y("验证码")]}}),g(S,{span:24,class:"van-hairline--bottom"},{default:function(){return[g(j,{modelValue:e.smsCode,"onUpdate:modelValue":function(t){return e.smsCode=t},name:"验证码",placeholder:"请输入验证码",type:"tel",maxlength:6},{button:function(){return e.countDownStatus?g("span",{class:m.codeText,onClick:e.onSendCode},[y("获取验证码")]):g(D,{ref:"countDownRef","auto-start":!1,time:e.countDownTime,onFinish:e.onFinished,format:"ss秒"},null)}})]}})]}})]}}),g("div",{class:m.margin34},[g(w,{round:!0,block:!0,type:"primary",disabled:this.codeDisable,onClick:this.onLogin},{default:function(){return[y("提交")]}})]),this.imgCodeStatus?g(C,{value:this.imgCodeStatus,"onUpdate:value":function(t){return e.imgCodeStatus=t},phone:this.username,type:"REGISTER",onClose:function(){e.imgCodeStatus=!1},onSendCode:this.onCodeSend},null):null,g(b,{show:this.showPopup,"onUpdate:show":function(t){return e.showPopup=t},round:!0,style:{width:"88%"},closeOnClickOverlay:!1,class:m.wxPopupDialog},{default:function(){return[g("div",{class:m.popupContainer},[g("p",{class:m.title},[y("温馨提示")]),g("p",{class:m.popupTips},[e.showPopupMessage])])]}})])}}))}}}))}();
  3. ========
  4. !function(){var e=["returnUrl","isRegister"];function t(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 n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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}function i(e,t,n,r,o,i,s){try{var a=e[i](s),u=a.value}catch(c){return void n(c)}a.done?t(u):Promise.resolve(u).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var s=e.apply(t,n);function a(e){i(s,r,o,a,u,"next",e)}function u(e){i(s,r,o,a,u,"throw",e)}a(void 0)}))}}System.register(["./validate-legacy.6a95b4fa.js","./index-legacy.c1f63540.js","./index-legacy.c75fe8a2.js","./index-legacy.2318e5fa.js","./index-legacy.45603cb6.js","./index-legacy.23d6cfad.js","./index-legacy.45d07924.js","./index-legacy.8a8e9c42.js"],(function(t){"use strict";var r,i,a,u,c,l,p,d,f,h,g,m,y,w,b,v,x,S,C,O,j,P,D;return{setters:[function(e){r=e.c,i=e.R,a=e.C,u=e.I},function(e){c=e.d,l=e.bi,p=e.f,d=e.m,f=e.bj,h=e.bk,g=e.g,m=e.s,y=e.n,w=e.o,b=e.c,v=e.bl,x=e.q,S=e.B,C=e.P},function(e){O=e.q},function(e){j=e.C},function(e){P=e.F},function(e){D=e.C},function(){},function(){}],execute:function(){t("default",c({name:"login-music",data:function(){return{loginType:"SMS",username:"",password:"",smsCode:"",countDownStatus:!0,countDownTime:12e4,imgCodeStatus:!1,showPopup:!1,showPopupMessage:"请使用微信打开",wxAppId:"",code:"",orchestraInfo:{},testIsWeixin:!1}},computed:{codeDisable:function(){var e=!0;return this.username&&this.smsCode&&(e=!1),e}},mounted:function(){l(),this.directNext(),p().weixin||this.testIsWeixin||(this.showPopup=!0),this.getDetails()},methods:{getDetails:function(){var e=this;return s(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.$route.query.id){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,d.get("/api-student/open/orchestra/detail/"+e.$route.query.id);case 6:n=t.sent,r=n.data,e.orchestraInfo=r||{},r.canSignUp||(e.showPopup=!0,e.showPopupMessage="学校已关闭"),t.next=14;break;case 12:t.prev=12,t.t0=t.catch(0);case 14:case"end":return t.stop()}}),t,null,[[0,12]])})))()},getAppIdAndCode:function(e){return s(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,d.get("/api-student/open/paramConfig/wechatAppId");case 3:n=t.sent,(r=n.data)&&(f(),h(r,e)),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})))()},directNext:function(){if("login"===g.user.status||"error"===g.user.status){var t=this.$route.query,r=t.returnUrl,i=(t.isRegister,o(t,e)),s=window.location.origin+window.location.pathname+"#"+r+"?"+O.stringify(n({},i));this.testIsWeixin?this.locationReplace(s):this.getAppIdAndCode(s)}},locationReplace:function(e){console.log(history.replaceState,"window.history.replaceState",e),history.replaceState?(history.replaceState(null,document.title,e),history.go(0)):location.replace(e)},onLogin:function(){var e=this;return s(regeneratorRuntime.mark((function t(){var r,o,i,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.orchestraInfo.canSignUp||(e.showPopup=!0,e.showPopupMessage="学校已关闭"),r={username:e.username,client_id:"jmedu-student",client_secret:"jmedu-student",autoRegister:!0,password:e.smsCode,loginType:"SMS",grant_type:"password"},t.next=5,d.post("/api-oauth/userlogin",{requestType:"form",data:n({},r)});case 5:return o=t.sent,i=o.data,m(i.token_type+" "+i.access_token),t.next=10,d.get("/api-student/user/getUserInfo",{initRequest:!0});case 10:s=t.sent,y(s.data),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 s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r(e.username)){t.next=2;break}return t.abrupt("return",w("请输入正确的手机号码"));case 2:e.imgCodeStatus=!0;case 3:case"end":return t.stop()}}),t)})))()},onCodeSend:function(){var e=this;this.countDownStatus=!1,this.$nextTick((function(){e.$refs.countDownRef.start()}))},onFinished:function(){this.countDownStatus=!0,this.$refs.countDownRef.reset()},onChange:function(){"PWD"===this.loginType?this.loginType="SMS":"SMS"===this.loginType&&(this.loginType="PWD")}},render:function(){var e=this;return b("div",{class:v.login},[b("div",{class:v.loginTitle},[x("您好,"),b("br",null,null),x(" 欢迎使用管乐团学员端")]),b(j,{class:v.margin34,border:!1},{default:function(){return[b(i,{style:{marginBottom:"16px"}},{default:function(){return[b(a,{span:24,class:v.formTitle},{default:function(){return[x("手机号")]}}),b(a,{span:24,class:"van-hairline--bottom"},{default:function(){return[b(P,{modelValue:e.username,"onUpdate:modelValue":function(t){return e.username=t},name:"手机号",placeholder:"请输入您的手机号",type:"tel",maxlength:11},null)]}})]}}),b(i,null,{default:function(){return[b(a,{span:24,class:v.formTitle},{default:function(){return[x("验证码")]}}),b(a,{span:24,class:"van-hairline--bottom"},{default:function(){return[b(P,{modelValue:e.smsCode,"onUpdate:modelValue":function(t){return e.smsCode=t},name:"验证码",placeholder:"请输入验证码",type:"tel",maxlength:6},{button:function(){return e.countDownStatus?b("span",{class:v.codeText,onClick:e.onSendCode},[x("获取验证码")]):b(D,{ref:"countDownRef","auto-start":!1,time:e.countDownTime,onFinish:e.onFinished,format:"ss秒"},null)}})]}})]}})]}}),b("div",{class:v.margin34},[b(S,{round:!0,block:!0,type:"primary",disabled:this.codeDisable,onClick:this.onLogin},{default:function(){return[x("提交")]}})]),this.imgCodeStatus?b(u,{value:this.imgCodeStatus,"onUpdate:value":function(t){return e.imgCodeStatus=t},phone:this.username,type:"REGISTER",onClose:function(){e.imgCodeStatus=!1},onSendCode:this.onCodeSend},null):null,b(C,{show:this.showPopup,"onUpdate:show":function(t){return e.showPopup=t},round:!0,style:{width:"88%"},closeOnClickOverlay:!1,class:v.wxPopupDialog},{default:function(){return[b("div",{class:v.popupContainer},[b("p",{class:v.title},[x("温馨提示")]),b("p",{class:v.popupTips},[e.showPopupMessage])])]}})])}}))}}}))}();
  5. >>>>>>>> online:dist/assets/login-legacy.a85faf45.js