home-layout-center.8021fda7.js 1.1 KB

1
  1. import{d as r,g as s,t as u,p as i,i as c,j as e,C as l,F as p}from"./index.e6d6174e.js";import{a,b as h}from"./index.87ef10a9.js";import"./auth.5a63a717.js";import"./routes-common.786ac133.js";var g=r({name:"home-layout-center",data(){return{status:!1}},mounted(){this.getUserInfo()},methods:{async getUserInfo(){try{const o=await a.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:s.orchestraInfo.phone,token:s.orchestraInfo.token,isSurportRegister:!0}}),{authentication:t}=o.data;u(t.token_type+" "+t.access_token),i({api:"setCache",content:{key:"h5-colexiu-token",value:t.token_type+" "+t.access_token}});const n=await a.get("/api-student/student/queryUserInfo",{initRequest:!0});c(n.data),this.$router.push("/home")}catch{this.status=!0}}},render(){return e(p,null,[this.status?e("div",{class:h.error},[e(l,{type:"notFond",classImgSize:"CERT",tips:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",buttonText:"\u91CD\u65B0\u52A0\u8F7D",plain:!0,onClick:this.getUserInfo},null)]):e("div",null,null)])}});export{g as default};