home-layout-center-legacy.b995f4a2.js 1.8 KB

12
  1. !function(){function e(e,t,n,r,o,s,u){try{var a=e[s](u),c=a.value}catch(i){return void n(i)}a.done?t(c):Promise.resolve(c).then(r,o)}System.register(["./index-legacy.fba2875c.js","./index-legacy.ec32ced6.js","./auth-legacy.0b00e81c.js","./routes-common-legacy.6845df4a.js"],(function(t){"use strict";var n,r,o,s,u,a,c,i,f,l;return{setters:[function(e){n=e.d,r=e.g,o=e.t,s=e.p,u=e.i,a=e.j,c=e.C,i=e.F},function(e){f=e.a,l=e.b},function(){},function(){}],execute:function(){t("default",n({name:"home-layout-center",data:function(){return{status:!1}},mounted:function(){this.getUserInfo()},methods:{getUserInfo:function(){var t,n=this;return(t=regeneratorRuntime.mark((function e(){var t,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.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=e.sent,a=t.data.authentication,o(a.token_type+" "+a.access_token),s({api:"setCache",content:{key:"h5-colexiu-token",value:a.token_type+" "+a.access_token}}),e.next=9,f.get("/api-student/student/queryUserInfo",{initRequest:!0});case 9:c=e.sent,u(c.data),n.$router.push("/home"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),n.status=!0;case 17:case"end":return e.stop()}}),e,null,[[0,14]])})),function(){var n=this,r=arguments;return new Promise((function(o,s){var u=t.apply(n,r);function a(t){e(u,o,s,a,c,"next",t)}function c(t){e(u,o,s,a,c,"throw",t)}a(void 0)}))})()}},render:function(){return a(i,null,[this.status?a("div",{class:l.error},[a(c,{type:"notFond",classImgSize:"CERT",tips:"加载失败,请稍后重试",buttonText:"重新加载",plain:!0,onClick:this.getUserInfo},null)]):a("div",null,null)])}}))}}}))}();