<template>
  <div id="index">
    <admin-frame topType="2" @back="back" :usePage="false" :rightArrow="false" :useNav="false">
      <template v-slot:info>
        <info-1 v-if="user.role == '1' || user.role == '2'"></info-1>
        <info-3 v-else-if="user.role == '3'"></info-3>
        <info-4 v-else-if="user.role == '4'"></info-4>
        <info-5 v-else-if="user.role == '5'"></info-5>
      </template>
    </admin-frame>
  </div>
</template>

<script>
import info1 from './parts/info-1.vue';
import info3 from './parts/info-3.vue';
import info4 from './parts/info-4.vue';
import info5 from './parts/info-5.vue';
import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'index',
  props: {},
  components: { adminFrame, info1, info3, info4, info5 },
  data: function () {
    return {};
  },
  created() {},
  methods: {
    // 返回
    back() {
      this.$router.push({ path: `/account/index` });
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped></style>
