<template>
  <view class="app-container pb-16">
    <ScheduleView :show-top-bar="false" :show-back="false" :show-status-bar="true" />
    <!-- #ifdef H5 || APP-PLUS -->
    <AppTabBar />
    <!-- #endif -->
  </view>
</template>

<script setup lang="ts">
import { onShow } from '@dcloudio/uni-app'
import { safeHideTabBar } from '@/utils'
import ScheduleView from '@/components/dispatch/ScheduleView.vue'
// #ifdef H5 || APP-PLUS
import AppTabBar from '@/components/common/AppTabBar.vue'
// #endif

onShow(() => {
  // #ifdef H5 || APP-PLUS
  safeHideTabBar({ animation: false, repeat: 10 })
  // #endif
  // #ifdef MP-WEIXIN
  const pages = getCurrentPages()
  const page = pages[pages.length - 1] as any
  page?.getTabBar?.()?.setSelected?.(1)
  // #endif
})
</script>
