123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <template>
- <div class="container">
- <!--<div class="search">
- <Input v-model="values" placeholder="请输入优课主题 (如:小学语文)" style="width: 200px" />
- <Button>搜索</Button>
- </div>-->
- <div class="activity-item" v-for="(item,index) in lessons" :key="index">
- <div class="activity-banner">
- <img :src="getThumb(index)" />
- </div>
- <div class="activity-brief">
- <div class="left">
- <div class="line">
- <span class="tips">优课主题:</span>
- <span class="items">{{item.name}}</span>
- <span class="status" style="background: #999;">已结束</span>
- </div>
- <div class="line"><span class="tips">起止时间:</span> <span class="items2">{{item.timeTip}}</span></div>
- <div class="line"><span class="tips">优课数:</span> <span class="items2">{{item.viewActivityCount}}</span></div>
- </div>
- <div class="right">
- <Button type="primary" size="large" @click="goDetails">查看详情</Button>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import lessons from '@/static/lessons.json'
- export default {
- components: {
- },
- data() {
- return {
- lessons: [],
- values:""
- }
- },
- created() {
- this.lessons = lessons.list;
- },
- methods: {
- getList(type) {
- let list = noticeList.list;
- var newArray = list.filter(function(item){
- return item.noticeTypeId == type;
- });
- this.noticeList = newArray;
- },
- getThumb(index) {
- let thumb = {
- 0: require("../../assets/image/bg_lessons.png"),
- 1: require("../../assets/image/bg_lessons_2.png"),
- 2: require("../../assets/image/bg_lessons_3.png")
- };
- return thumb[index];
- },
- handleMenuClick(index,typeId,name) {
- this.activeIndex = index;
- this.typeName = name;
- this.getList(typeId);
- },
- goDetails() {
- this.$router.push('lessonList')
- }
- },
- mounted() {
- }
- }
- </script>
- <style scoped>
- html, body, #app {
- height: 100% !important;
- user-select: none;
- }
- .main-content {
- background: rgb(248,248,248) !important;
- }
- .container {
- width: 1200px;
- margin: 100px auto;
- display: flex;
- flex-direction: column;
- }
- .container .activity-item {
- width:100%;
- padding-bottom:50px;
- background:#fff;
- margin-top:40px;
- }
- .container .activity-item .activity-banner img {
- width:100%;
- }
- .container .activity-brief {
- width:100%;
- padding:15px 40px;
- display:flex;
- flex-direction:row;
- justify-content:space-between;
- align-items:center;
- }
- .container .activity-brief .line {
- font-size:16px;
- margin-top:10px;
- }
- .container .activity-brief .status {
- font-size:14px;
- padding:2px 8px;
- margin-left:8px;
- border-radius:5px;
- color:#fff;
- }
- .container .activity-brief .line .tips{
- font-weight:bold;
- color:#999;
- }
- .container .time-count {
- font-size:16px;
- margin-bottom:20px;
- }
- .container .time-count .count-down {
- color:orange;
- }
- .container .right .ivu-btn {
- width:180px;
- height:48px;
- font-size:16px;
- }
- </style>
|