<!-- 投诉举报 -->
<template>
  <div v-if="show">
    <nav-bar :showTab="false"></nav-bar>
    <router-view v-slot="{ Component }">
      <transition mode="out-in">
        <component :is="Component"></component>
      </transition>
    </router-view>
  </div>
</template>

<script>
import { addRoutes } from 'vue-helper'
import { axios } from 'axios'
import { ref } from 'vue'
export default {
  components: {
    'nav-bar': VueConfig.vueLoader('@/components/tab-router.vue'),
  },
  setup() {
    const show = ref(false)

    axios.verify(null, false).then((resp) => {
      addRoutes('/complaint', [
        {
          meta: '投诉举报',
          path: '/complaint',
          name: 'complaint',
          component: '@/views/complaint/complaint-base.vue',
        },
				{
					meta: '反馈列表',
					path: '/complaint-list',
					name: 'complaint-list',
					component: '@/views/complaint/complaint-list.vue',
				},
      ])

      show.value = true
    })

    return {
      show
    }
  }
}
</script>
