<template>
  <div id="index">
    <el-row>
      <el-col :span="24" class="style">
        <el-col :span="24" class="top">
          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
        </el-col>
        <el-col :span="24" class="main">
          <el-col :span="24" class="one">
            <el-image :src="imgUrl"></el-image>
            <p>{{ user.name }}</p>
          </el-col>
          <el-col :span="24" class="two">
            <clickBtn></clickBtn>
          </el-col>
        </el-col>
        <el-col :span="24" class="foot">
          <footInfo></footInfo>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
import NavBar from '@/layout/common/topInfo.vue';
import footInfo from '@/layout/common/footInfo.vue';
import clickBtn from './parts/clickBtn.vue';

export default {
  name: 'index',
  props: {},
  components: {
    NavBar,
    footInfo,
    clickBtn,
  },
  data: function() {
    return {
      // 头部标题
      title: '',
      // meta为true
      isleftarrow: '',
      // 返回
      navShow: true,
      imgUrl: require('@/assets/test.jpg'),
    };
  },
  created() {},
  methods: {},
  computed: {
    ...mapState(['user']),
  },
  mounted() {
    this.title = this.$route.meta.title;
    this.isleftarrow = this.$route.meta.isleftarrow;
  },
};
</script>

<style lang="less" scoped>
.style {
  width: 100%;
  min-height: 667px;
  position: relative;
  background-color: #f9fafc;
}
.top {
  height: 46px;
  overflow: hidden;
  position: relative;
  z-index: 999;
}
.main {
  min-height: 570px;
  .one {
    text-align: center;
    background-color: #fff;
    padding: 15px 0;
    margin: 0 0 15px 0;
    .el-image {
      width: 80px;
      height: 80px;
      border-radius: 90px;
    }
    p {
      font-size: 18px;
      padding: 15px 0;
    }
  }
}
.foot {
  position: absolute;
  bottom: 0;
}
</style>
