<template>
  <div id="app">
    <router-view />
    <theme-picker />
    <!-- 1 -->
  </div>
</template>

<script>
import ThemePicker from "@/components/ThemePicker";
import { xzTree } from "@/api/yingji/keyEnterprise.js";

export default {
  name: "App",
  destroyed() {
    localStorage.removeItem("isGovernmentAffairsNetwork");
  },
  components: { ThemePicker },
  metaInfo() {
    return {
      title:
        this.$store.state.settings.dynamicTitle &&
        this.$store.state.settings.title,
      titleTemplate: (title) => {
        return title
          ? `${title} - ${process.env.VUE_APP_TITLE}`
          : process.env.VUE_APP_TITLE;
      },
    };
  },
  created () {
    // 行政区域树状
    xzTree().then((res) => {
      localStorage.setItem("TREE_DATA",JSON.stringify(res.data))
    });
  },
};
</script>
<style scoped>
#app .theme-picker {
  display: none;
}
</style>
