<template>
  <view class="me_page">
    <hs-all-page-bg />
    <view class="me_page_content">
      <MyHeader />
      <MyAreaFunctional />
      <MyToBeDone />
    </view>
    <!-- <MyMoreFunctional /> -->
  </view>
</template>

<script setup lang="ts">
import { onLoad, onShow } from '@dcloudio/uni-app'
import useModel from './model'
import { useWeAppAuthStore } from '@/common'
import MyHeader from './components/header.vue'
import MyAreaFunctional from './components/AreaFunctional.vue'
import MyToBeDone from './components/ToBeDone.vue'

import MyMoreFunctional from './components/MoreFunctional.vue'
import method from './method'
import { getCurrentInstance, ref } from 'vue'
const App = getApp()
const auth = useWeAppAuthStore()
const userData = ref<any>({})
import getLoginStatus from '@/common/libraries/userUserLogin'

onShow(async e => {
  userData.value = auth?.data
  await getCurrentInstance()?.appContext.config.globalProperties.$onLaunched
  if (getLoginStatus?.getLoginStatus()) {
    useModel.dataList.value = []
    method.getOwnerAuditList()
    method.getCountHouse()
    method?.getHouseKeeper()
  } else {
    useModel.dataList.value = []
    useModel.meta.value = { total: 0 }
  }
})
</script>

<style lang="scss">
@import './style.scss';
</style>
