!function(){function e(e,n,t,r,o,s,a){try{var c=e[s](a),i=c.value}catch(u){return void t(u)}c.done?n(i):Promise.resolve(i).then(r,o)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(o,s){var a=n.apply(t,r);function c(n){e(a,o,s,c,i,"next",n)}function i(n){e(a,o,s,c,i,"throw",n)}c(void 0)}))}}System.register(["./index-legacy.b2528a15.js","./index-legacy.ca42ae97.js","./index-legacy.4141d9b6.js","./logo-legacy.cf4b3bd2.js"],(function(e){"use strict";var t,r,o,s,a,c,i,u,f,h,p,l,d,m,v,g,k;return{setters:[function(e){t=e.d,r=e.s,o=e.b1,s=e.br,a=e.p,c=e.T,i=e.m,u=e.f,f=e.i,h=e.A,p=e.B},function(e){l=e.I},function(e){d=e.r,m=e.a,v=e.s,g=e.b},function(e){k=e.l}],execute:function(){e("default",t({name:"login-music",data:function(){return{username:"",imgCodeStatus:!1}},mounted:function(){var e=this;this.username=r.orchestraInfo.phone,d(),o("webViewOnResume",(function(){i({api:"getUserAccount"}).then(function(){var t=n(regeneratorRuntime.mark((function n(t){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o=t.content,r.orchestraInfo.token=o.token.split(" ")[1],r.orchestraInfo.phone=o.phone,r.orchestraInfo.nickname=o.nickname,r.orchestraInfo.avatar=o.avatar,r.orchestraInfo.unionId=o.unionId||0,e.username=r.orchestraInfo.phone,o.unionId&&"/home-auth"===e.$route.path&&e.getUserInfo();case 8:case"end":return n.stop()}}),n)})));return function(e){return t.apply(this,arguments)}}())}))},unmounted:function(){s("webViewOnResume",(function(){}))},methods:{onLoginSuccess:function(){var e=this;a({api:"bindUserAccount",content:{phone:this.username}}),setTimeout((function(){c("授权成功")}),100),setTimeout((function(){e.getUserInfo()}),1e3)},getUserInfo:function(){var e=this;return n(regeneratorRuntime.mark((function n(){var t,o,s;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,m.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:r.orchestraInfo.phone,token:r.orchestraInfo.token,isSurportRegister:!0}});case 3:return t=n.sent,o=t.data.authentication,v(o.token_type+" "+o.access_token),i({api:"setCache",content:{key:"h5-colexiu-token",value:o.token_type+" "+o.access_token}}),n.next=9,m.get("/api-student/student/queryUserInfo",{initRequest:!0});case 9:s=n.sent,u(s.data),e.$router.push("/home"),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(0);case 16:case"end":return n.stop()}}),n,null,[[0,14]])})))()},onLogin: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.prev=0,n.next=3,m.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:e.username,token:r.orchestraInfo.token,isSurportRegister:!0}});case 3:t=n.sent,o=t.data.authentication,v(o.token_type+" "+o.access_token),i({api:"setCache",content:{key:"h5-colexiu-token",value:o.token_type+" "+o.access_token}}),e.onLoginSuccess(),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(0);case 12:case"end":return n.stop()}}),n,null,[[0,10]])})))()}},render:function(){var e=this;return f("div",{class:g.login},[f("div",{class:g.container},[f("div",{class:[g.userInfo,g.loginCenter]},[f(l,{src:r.orchestraInfo.avatar||"./assets/icon-student-default.0e847d86.png",class:g.img,fit:"cover"},null),f("p",{class:g.name},[r.orchestraInfo.name])]),f("div",{class:[g.tips,g.loginCenter]},[f(l,{src:k,class:g.logo,fit:"contain"},null),f("p",{class:g.text},[h("同意酷乐秀获取您的管乐团信息并登录")]),f("p",{class:g.phone},[this.username])])]),f("div",{class:g.btnGroup},[f(p,{round:!0,color:"#FF8057",class:g.btn,onClick:this.onLogin},{default:function(){return[h("授权登录")]}}),f("span",{class:g.moreBtn,onClick:function(){e.$router.push("/home-login")}},[h("其他手机号登录")])])])}}))}}}))}();
