<template>
  <div class="cy-account-manage">
    <router-view />
    <template v-if="!$route.query.type">
      <flow-picture :hide-jump="true" style="margin-bottom: 10px;" />
      <template v-if="accountList.length === 0">
        <empty type="openInfoManage" :margin-top="'5vh'" />
      </template>
      <template v-else>
        <main-content :info-data="accountList" />
      </template>
    </template>
  </div>
</template>
<script>
import { queryMemberList } from '@/api/accountCenter/cyAccountManage.js'

export default {
  name: 'CyAccountManage',
  components: {
    MainContent: () => import('./mainContent.vue'),
    FlowPicture: () => import('../components/FlowPicture.vue'),
    Empty: () => import('../components/Empty.vue')
  },
  data() {
    return {
      accountList: []
    }
  },
  mounted() {
    this.fetchData()
  },
  methods: {
    async fetchData() {
      const res = await queryMemberList()
      console.log('queryMemberList----', res)
      if (res.data) {
        this.accountList = res.data
      }
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
