<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import { getUserInfo } from '@/api/user.js'

export default {
  name: 'App',
  mounted() {
    getUserInfo()
      .then(res => {
        localStorage.setItem('realname', res.data.realname)
        localStorage.setItem('username', res.data.username)
      })
  }
}
</script>
