Lessons.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div class="container">
  3. <div class="search">
  4. <Input v-model="value" placeholder="请输入优课主题 (如:小学语文)" style="width: 200px" />
  5. <Button>搜索</Button>
  6. </div>
  7. <div class="activity-item" v-for="(item,index) in lessons" :key="index">
  8. <div class="activity-banner">
  9. <img :src="'http://ttkt.sxedu.org:70'+item.bannerUri" />
  10. </div>
  11. <div class="activity-brief">
  12. <div class="left">
  13. <div class="line">
  14. <span class="tips">优课主题:</span>
  15. <span class="items">{{item.name}}</span>
  16. <span class="status" style="background: #999;">已结束</span>
  17. </div>
  18. <div class="line"><span class="tips">起止时间:</span> <span class="items2">{{item.timeTip}}</span></div>
  19. <div class="line"><span class="tips">优课数:</span> <span class="items2">{{item.viewActivityCount}}</span></div>
  20. </div>
  21. <div class="right">
  22. <Button type="primary" size="large" @click="goDetails">查看详情</Button>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. import lessons from '@/static/lessons.json'
  30. export default {
  31. components: {
  32. },
  33. data() {
  34. return {
  35. lessons: []
  36. }
  37. },
  38. created() {
  39. this.lessons = this.$staticTools.lessons;
  40. },
  41. methods: {
  42. goDetails() {
  43. this.$router.push('lessonList')
  44. }
  45. },
  46. mounted() {
  47. }
  48. }
  49. </script>
  50. <style scoped>
  51. html, body, #app {
  52. height: 100% !important;
  53. user-select: none;
  54. }
  55. .main-content {
  56. background: rgb(248,248,248) !important;
  57. }
  58. .container {
  59. width: 1200px;
  60. margin: 100px auto;
  61. display: flex;
  62. flex-direction: column;
  63. }
  64. .container .activity-item {
  65. width:100%;
  66. padding-bottom:50px;
  67. background:#fff;
  68. margin-top:40px;
  69. }
  70. .container .activity-item .activity-banner img {
  71. width:100%;
  72. }
  73. .container .activity-brief {
  74. width:100%;
  75. padding:15px 40px;
  76. display:flex;
  77. flex-direction:row;
  78. justify-content:space-between;
  79. align-items:center;
  80. }
  81. .container .activity-brief .line {
  82. font-size:16px;
  83. margin-top:10px;
  84. }
  85. .container .activity-brief .status {
  86. font-size:14px;
  87. padding:2px 8px;
  88. margin-left:8px;
  89. border-radius:5px;
  90. color:#fff;
  91. }
  92. .container .activity-brief .line .tips{
  93. font-weight:bold;
  94. color:#999;
  95. }
  96. .container .time-count {
  97. font-size:16px;
  98. margin-bottom:20px;
  99. }
  100. .container .time-count .count-down {
  101. color:orange;
  102. }
  103. .container .right .ivu-btn {
  104. width:180px;
  105. height:48px;
  106. font-size:16px;
  107. }
  108. </style>