<script>
import config from './config'
import store from '@/store'
import { getAccessToken, removeToken } from '@/utils/auth'

export default {
  onLaunch: function () {
    this.initApp()
  },
  methods: {
    // 初始化应用
    async initApp() {
      await uni.hideTabBar()
      uni.hideTabBar({
        animation: false
      })
      // 初始化应用配置
      this.initConfig()
      // 检查用户登录状态
      this.checkLogin()
    },
    initConfig() {
      // removeToken()
      this.globalData.config = config
    },
    checkLogin() {
      this.$tab.reLaunch('/pages/login')
    }
  }
}
</script>

<style lang="scss">
@import '@/uni_modules/windi-css-uniapp/index.scss';
@import '@/static/scss/index.scss';
</style>
