<template>
  <div class="app">
    <ks-header title="班级名称"></ks-header>
    <ks-box style="padding:15px;">
      <div class="notice">
        <van-icon class="notice-img" name="volume" size="16px"/>提供优质的学习资讯，掌握最新的学习方向
      </div>
      <ks-box style="background-color:rgb(244, 244, 244); margin-bottom: 15px; padding:15px 20px;">
        <div class="task">
          <div class="task-Today">
            今日作业：公务员制度1
            <van-button round size="small">开始做题</van-button>
          </div>
          <div class="task-date">2019-04-25</div>
          <van-progress
            class="task-pro"
            :show-pivot="false"
            color="#f44"
            :percentage="list.has_learnpercent*100"
          />
          <div class="task-pros">{{list.has_learnpercent*100}}%</div>
        </div>
      </ks-box>
      <div class="mylist">
        <div class="mylist-title">{{list.title}}</div>
        <div class="mylist-vtitle">课后作业</div>
        <div class="mylist-stal">
          已学习
          <span class="mylist-stal__span">{{list.has_coursecount}}</span>
          门/共{{list.coursecount}}门
          <div class="fr">学员{{list.buycount}}人</div>
        </div>
        <van-progress
          class="mylist-progress"
          :show-pivot="false"
          color="#f44"
          :percentage="list.has_learnpercent*100"
        />
      </div>
      <div class="clt">
        <van-row style="margin-bottom: 5px;">
          <van-col span="8">
            <img class="clt-img" src="../../assets/user/1.png">
          </van-col>
          <van-col span="16">
            <div class="clt-r">
              <div class="clt-r__title">{{list.title}}</div>
              <div class="clt-r__middle">
                {{list.teacher}}
                <div class="clt-r__middle__sp">未学</div>
              </div>
              <div class="ks-line"></div>
            </div>
          </van-col>
        </van-row>
      </div>
    </ks-box>
  </div>
</template>
<script>
export default {
  name: "MyClassroomDetail",
  data() {
    return {
      list: []
    };
  },
  methods: {
    getMyClassroomDetail() {
      this.list = JSON.parse(localStorage.classroomDetail);
      this.list.has_learnpercent = Number(this.list.has_learnpercent);
    }
  },
  mounted() {
    this.getMyClassroomDetail();
  },
  created() {},
  activated() {
    document.title = "我的课程";
  }
};
</script>
<style scoped>
.app {
  background-color: #f2f3f5;
}
.fr {
  float: right;
}
.middlep {
  background-color: #fff;
  width: 100%;
  height: 180px;
  margin-top: 6px;
  border-radius: 10px;
}
.my-exam {
  height: 44px;
  background-color: #fff;
}
.my-exam__a {
  font-size: 16px;
  margin: 0 10px 0 20px;
  line-height: 40px;
  font-weight: bolder;
  color: rgba(51, 51, 51, 1);
  margin-top: 14.5px;
}
.my-exam__aa {
  font-size: 16px;
  margin: 0 10px 0 20px;
  font-weight: bolder;
  font-family: PingFang-SC-Bold;
  color: rgba(51, 51, 51, 1);
}
.mylist-title {
  margin-bottom: 15px;
  font-size: 15px;
  float: left;
  font-weight: bold;
}
.mylist-vtitle {
  font-size: 13px;
  float: right;
  color: #f45050;
}
.mylist-stal {
  clear: both;
  font-size: 13px;
  color: rgba(153, 153, 153, 1);
}
.mylist-progress {
  margin-top: 10px;
}
.van-progress {
  height: 5px;
  position: relative;
  border-radius: 5px;
  background: #fddcdc;
}
.mylist-stal__span {
  color: #f45050;
  font-size: 13px;
}
.notice {
  color: #ff812d;
  font-size: 12px;
  margin-bottom: 5px;
  text-align: top;
}
.van-button--small {
  padding: 0 8px;
  height: 23px;
  min-width: 66px;
  font-size: 12px;
  line-height: 23px;
  float: right;
  background-color: #ff795c;
  color: #fff;
}
.task-Today {
  color: #f45050;
  font-weight: 600;
}
.task-date {
  color: #999999;
  font-size: 12px;
  clear: both;
}
.task-pro {
  margin: 10px 0 8px 0;
}
.task-pros {
  color: #999999;
  font-size: 12px;
  text-align: right;
}
.clt {
  margin: 15px 10.5px 10px 0;
}
.clt-img {
  margin-right: 10.5px;
  width: 92.5px;
  height: 61.5px;
  border-radius: 10px;
}
.clt-r__title {
  margin-top: 6px;
  text-align: left;
  font-size: 13px;
  font-weight: bold;
}
.clt-r__middle {
  clear: both;
  font-size: 14px;
  font-weight: 500;
  color: rgba(153, 153, 153, 1);
}
.clt-r__middle {
  margin-top: 19px;
  margin-bottom: 23.5px;
}
.clt-r__middle__sp {
  float: right;
}
.notice-img {
  margin-right: 5px;
  position: relative;
  top: 4px;
}
</style>


