<template>
    <global-page :showNavbar="false" refresherEnabled @handleQuery="handleQuery">
        <!-- 导航栏 -->
        <template #top>
            <image class="page-bg" src="/static/mocp/image/panel/page-bg.png" />
            <panel-navbar></panel-navbar>
        </template>
        <!-- 菜单图标 -->
        <panel-menu style="flex: auto"></panel-menu>
    </global-page>
</template>

<script setup>
import PanelNavbar from './components/panel-navbar.vue'
import PanelMenu from './components/panel-menu.vue'
import useMyToDoStore from 'mocp/store/my-toDo'

//刷新我的待办个数
const myToDoStore = useMyToDoStore()
const handleQuery = async () => {
    uni.showLoading({
        title: '加载中',
        mask: true
    })
    await myToDoStore.initData()
    uni.hideLoading()
}
</script>
<style lang="scss" scoped>
.page-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
}
</style>
