<template>
  <div class="play-record">
    <div class="play-record__header clearfix">
      播放记录
      <a class="clear-btn">清空记录</a>
    </div>
    <div class="play-record__body">
      <div class="date-item" v-for="(item, index) in 2" :key="index">
        <div class="date-item__header">2022-12-23</div>
        <div class="date-item__body">
          <div class="list">
            <div class="course-item" v-for="(item, index) in 2" :key="index">
              <div class="course-item__header">这是节名称</div>
              <div class="course-item__body">
                <div class="img"></div>
                <div class="text">
                  <div class="title">
                    二级建造师建设工程施工管理
                    <div class="note">60学时</div>
                  </div>
                  <div class="progress">
                    学习进度
                    <el-progress
                      class="progress-line"
                      :text-inside="true"
                      :stroke-width="16"
                      :percentage="70"
                    ></el-progress>
                  </div>
                </div>
                <div class="btns-wrap">
                  <div class="btns">
                    <div class="btn btn--warm">删除记录</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "MyCourse",
  data() {
    return {
      activeName: "1",
    };
  },
  mounted() {},
  methods: {
    pay() {
      this.$router.push({
        path: "payment-success",
      });
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.play-record {
  &__header {
    height: 56px;
    line-height: 56px;
    .clear-btn {
      margin-top: 12px;
      float: right;
      display: block;
      width: 122px;
      height: 32px;
      background: #eeeeee;
      border-radius: 16px;
      text-align: center;
      line-height: 32px;
      color: #3f8dfd;
    }
  }
  &__body {
    .date-item {
      margin-top: 24px;
      border-top: 1px solid #eee;

      &:nth-of-type(1) {
        margin: 0;
      }

      &__header {
        padding-left: 15px;
        height: 40px;
        line-height: 40px;
      }

      &__body {
        .list {
          .course-item {
            margin-top: 20px;
            background: #fafbfc;
            border-radius: 8px;
            overflow: hidden;

            &:nth-of-type(1) {
              margin: 0;
            }

            &__header {
              height: 40px;
              border-bottom: 1px solid #eee;
              padding: 0 18px;
              line-height: 40px;
              font-size: 16px;
              font-family: Microsoft YaHei;
              font-weight: bold;
              color: #333333;
            }

            &__body {
              .img {
                float: left;
                width: 160px;
                height: 90px;
                background: #3f8dfd;
              }

              .text {
                float: left;
                margin-left: 12px;
                .title {
                  margin-top: 10px;
                  font-size: 16px;
                  font-family: Microsoft YaHei;
                  font-weight: 400;
                  color: #333333;
                  .note {
                    display: inline-block;
                    vertical-align: middle;
                    border: 1px solid #333333;
                    border-radius: 4px;
                    font-size: 12px;
                    font-family: Microsoft YaHei;
                    font-weight: 400;
                    color: #333333;
                    padding: 2px 5px;
                    margin-left: 12px;
                  }
                }

                .progress {
                  margin-top: 30px;

                  font-size: 14px;
                  font-family: Microsoft YaHei;
                  font-weight: 400;
                  color: #333333;

                  &-line {
                    width: 200px;
                    display: inline-block;
                  }
                }
              }

              .btns-wrap {
                display: table;
                float: right;
                height: 90px;
                width: 130px;

                .btns {
                  display: table-cell;
                  vertical-align: middle;
                  text-align: center;

                  .btn {
                    cursor: pointer;
                    margin: 2px 0;
                    width: 122px;
                    height: 32px;
                    background: #3f8dfd;
                    border-radius: 16px;
                    display: inline-block;
                    text-align: center;
                    line-height: 32px;
                    color: #fff;

                    &--warm {
                      background: #ff3b30;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
</style>
