<script setup lang="ts">
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
import { getCurrentInstance } from 'vue'
import { useWeAppAuthStore } from './common'
import { CheckUpdate } from './common/libraries/updateManager'

const auth = useWeAppAuthStore()
const globalData = {
  //全局变量
  selectProject: {},
  address_city:"",
  //当前默认角色
  selectedOrg: {},
  selectedIndex: 0,
  menuList:[]
}

onLaunch(async () => {
  const app = getCurrentInstance()
  await auth.login(app)
  auth.SetAddressCity()
  console.log('App Launch')
  // 检查更新
  // #ifdef MP-WEIXIN
  CheckUpdate()
  // #endif
})



onShow(() => {})
onHide(() => {
  console.log('App Hide')
})
</script>
<style lang="scss">
@import 'uview-plus/index.scss';
// .tab_page {
//   padding-bottom: calc(48px + constant(safe-area-inset-bottom));
//   padding-bottom: calc(48px + env(safe-area-inset-bottom));
// }
// .placeholderClass {
//   font-size: 24rpx;
//   line-height: 30rpx;
// }
</style>
