<template>
  <div id="index">
    <admin-frame :useTop="false" :usePage="false" :useNav="false">
      <template v-slot:info>
        <van-button v-for="(i, index) in menu" :key="`menu-${index}`" @click="$router.push(i.router)">{{ i.label }}</van-button>
        <van-button @click="$router.push({ path: '/test' })">常用方法页面</van-button>
      </template>
    </admin-frame>
  </div>
</template>

<script>
import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'index',
  props: {},
  components: {
    adminFrame,
  },
  data: function () {
    return {
      menu: [
        {
          label: '专利超市-专利检索',
          router: '/market/patentInfo/index',
        },
        {
          label: '专利超市-专利转让',
          router: '/market/transfer/index',
        },
        {
          label: '专利超市-专利需求',
          router: '/market/demand/index',
        },
        {
          label: '专利超市-专利导航',
          router: '/market/navigation/index',
        },
        {
          label: '咨询服务-政策资讯',
          router: '/service/notice/index',
        },
        {
          label: '咨询服务-法律法规',
          router: '/service/law/index',
        },
        {
          label: '咨询服务-研究报告',
          router: '/service/dimension/index',
        },
        {
          label: '咨询服务-使用指南',
          router: '/service/interflow/index',
        },
        {
          label: '个人中心-个人设置',
          router: '/account/index',
        },
      ],
    };
  },
  async created() {},
  methods: {},
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

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