<template>
  <div>
    <router-view />
    <van-tabbar route :placeholder="true" >
      <van-tabbar-item replace to="/lawEnforcement/index_new">
        首页
        <template #icon="props">
          <img :src="props.active ? '../../../static/images/lawEnforcement/new/tab_04.png' : '../../../static/images/lawEnforcement/new/tab_00.png'" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item replace to="/lawEnforcement/retrospect">
        追溯
        <template #icon="props">
          <img :src="props.active ? '../../../static/images/lawEnforcement/new/tab_05.png' : '../../../static/images/lawEnforcement/new/tab_01.png'" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item replace to="/lawEnforcement/monitor">
        监控
        <template #icon="props">
          <img :src="props.active ? '../../../static/images/lawEnforcement/new/tab_06.png' : '../../../static/images/lawEnforcement/new/tab_02.png'" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item replace to="/lawEnforcement/user_new">
        我的
        <template #icon="props">
          <img :src="props.active ? '../../../static/images/lawEnforcement/new/tab_07.png' : '../../../static/images/lawEnforcement/new/tab_03.png'" />
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
import { getUserProfile } from "@/api/lawEnforcement/index";
export default {
  name: "lawNew",
  data() {
    return {
      active: 0,
      tabShow: true,
    };
  },
  created() {
    // v-if="tabShow"
    // getUserProfile().then(response => {
    //   if (response.data.roles.length < 1){
    //     this.tabShow = false;
    //   }else{
    //     response.data.roles.forEach(res=>{
    //       if(res.roleKey == 'personal_user' || res.roleKey == 'company_user'){
    //         this.tabShow = false;
    //       }else{
    //         this.tabShow = true;
    //       }
    //     })
    //   }
    // });
  },
  methods: {
    abc(){
      this.$dialog.alert({
        message: '功能暂未开放！',
      })
    }
  },
};
</script>

<style scoped >

.van-tabbar{
  height:1.5rem;
}
</style>
