<!--
 * @Author: micky
 * @Date: 2024-08-10 15:24:06
 * @LastEditors: micky
 * @LastEditTime: 2024-08-30 15:16:29
 * @FilePath: \chargingpile-uniapp\src\App.vue
-->
<script setup lang="ts">
import { onLaunch, onShow } from '@dcloudio/uni-app'
import { useAppStore } from './stores/app'
import { useUserStore } from '@/stores/user'
import { getAllDict } from '@/hooks/useDictOptions'

const appStore = useAppStore()
const userStore = useUserStore()
getAllDict()

onLaunch(async () => {
    appStore.getSystemInfoFn()
    // await appStore.getConfig()
    // appStore.getLocationFunc()
})

onShow(async () => {
    const token = userStore.token
    if (token) {
        // await appStore.getConfig()
        appStore.updateLocation()
    } else appStore.closeTimer()
})
</script>
<style lang="scss"></style>
