<template>
  <div class="page-content">
    <v-nav :navpath="navpath" />
    <photo-album :member-id="memberId" :from="from" />
    <vue-gic-footer style="padding-bottom:80px" />
  </div>
</template>

<script>
import vNav from '@/common/navbar/navbar.vue';
import photoAlbum from './photo-album.vue';
export default {
  name: 'Album',
  components: {
    vNav,
    photoAlbum,
  },
  data () {
    return {
      navpath: [
        {
          name: '首页',
          path: '',
        },
        {
          name: '会员详情',
          path: '',
        },
        {
          name: '相册',
          path: '',
        },
      ],
      memberId: '',
      from: '',
    };
  },
  created () {
    const from = this.$route.query.from;
    const memberId = this.$route.query.memberId;
    this.memberId = memberId;
    this.from = from;
    switch (from) {
      case '0':
        // 微信会员
        this.navpath[1] = {
          name: '会员详情',
          path: `/wechatmemberDetail?memberId=${memberId}`,
        };
        break;
      case '1':
        // 微信总量
        this.navpath[1] = {
          name: '会员详情',
          path: `/wechatTotalDetail?memberId=${memberId}`,
        };
        break;
      default:
        this.navpath.splice(1, 1);
    }
  },
};
</script>

<style lang="scss" scoped>
.page-content {
  min-width: 1400px;
}
</style>
