
<template>
  <div class="timeline-container">
    <div class="timeline-content">
      <div class="timeline-entry-list">
        <div class="entry-list-container">
          <div class="tab-title">
            <div class="title-box">
              <span class="box-text">积分排行榜</span>
            </div>
          </div>
          <el-card class="box-card">
            <div class="tab-list">
              <div class="list-title">
                <div class="title-left">
                  <div class="left-rank title-text">排名</div>
                  <div class="left-avatar title-text">头像</div>
                  <div class="left-userName title-text">用户名</div>
                </div>
                <div class="title-right">
                  <div class="right-Integral title-text">积分</div>
                </div>
              </div>
              <div v-for="(item,index) in 10" class="list-title list-item">
                <div class="title-left">
                  <div class="left-rank">
                    <el-avatar v-if="index==0" :size="50" :src="avatarUrl"></el-avatar>
                    <el-avatar v-else-if="index==1" :size="50" :src="avatarUrl"></el-avatar>
                    <el-avatar v-else-if="index==2" :size="50" :src="avatarUrl"></el-avatar>
                    <div v-else>{{ index+1 }}</div>
                  </div>
                  <div class="left-avatar">
                    <el-avatar :size="50" :src="avatarUrl"></el-avatar>
                  </div>
                  <div class="left-userName item-text">兔子爱吃香蕉皮</div>
                </div>
                <div class="title-right">
                  <div class="right-Integral item-text">10000</div>
                </div>
              </div>
            </div>
          </el-card>
        </div>
      </div>
      <SiderInfo></SiderInfo>
    </div>
  </div>
</template>
    
  
  <script>
import { msgList } from "@/api/allApi";
import SiderInfo from "@/components/SiderInfo.vue";
export default {
  components: {
    SiderInfo,
  },
  data() {
    return {
      avatarUrl:
        "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
      dataList: [],
      page: 1,
      pages: 1,
    };
  },
  created() {
    // this.getDataList();
  },
  methods: {
    handleClickMag(id) {
      this.$router.push({
        path: "/home/index/msgDetail",
        query: {
          id: id,
        },
      });
    },
    getDataList() {
      let data = {
        limit: 10,
        page: this.page,
        type: 0,
      };
      msgList(data).then((response) => {
        this.dataList = response.data.data.list;
      });
    },
  },
};
</script>
  <style scoped>
.timeline-container {
  margin: 0 auto;
}
.timeline-entry-list {
  margin-right: 17.5rem;
  border-radius: 2px;
  width: 720px;
  position: relative;
}
.entry-list-container {
  background-color: #fff;
  border-radius: 4px;
  padding: 20px 20px 16px;
  min-height: 500px;
}
.entry-list-container .tab-title {
  margin-bottom: -25px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.tab-title .title-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #1e80ff;
  border-radius: 25px;
}
.title-box .box-text {
  color: #fff;
  padding: 10px 40px;
  font-size: 20px;
}
.entry-list-container .tab-list {
  margin: 0 auto;
  width: 450px;
}
.tab-list .list-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tab-list .list-title {
  margin-top: 15px;
}
.list-title .title-left {
  width: 70%;
  display: flex;
  align-items: center;
}
.title-left .left-rank,
.title-left .left-avatar,
.title-left .left-userName,
.title-right .right-Integral {
  display: flex;
  justify-content: center;
  align-items: center;
}
.title-left .left-rank {
  width: 60px;
}
.title-left .left-avatar {
  width: 60px;
}
.title-left .left-userName {
  width: 150px;
}
.title-right .right-Integral {
  width: 60px;
}
.title-text {
  color: #8a919f;
}
.item-text {
  color: #1d2129;
  font-weight: 600;
}
.box-card {
  margin: 0 auto;
  width: 500px;
  border-radius: 10px;
}
</style>