video.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <div class="video">
  3. <div class="video_box">
  4. <div class="video_title"><div class="video_name">微课</div><i>2638</i></div>
  5. <ul class="video_select">
  6. <li class="select_name">语文</li>
  7. <li class="select_name">数学</li>
  8. <li class="select_name">英语</li>
  9. <li class="select_name">物理</li>
  10. <li class="select_name">化学</li>
  11. <li class="select_name_more"><Icon type="ios-more" size="16" /></li>
  12. </ul>
  13. <div class="video_list">
  14. <div class="video_left">
  15. <img :src="imgurl" />
  16. <a target="_blank" href="/videodetails" class="playbtn1"></a>
  17. <h4 class="name">
  18. <a target="_blank" href="" style="color:#fff">{{imgtext}}</a>
  19. </h4>
  20. </div>
  21. <ul class="video_right">
  22. <li class="video_more_list" v-for="item in video_list">
  23. <img :src="item.imgurl" />
  24. <a target="_blank" :href="item.url" class="playbtn1"></a>
  25. <h4 class="name_more">
  26. <a target="_blank" :href="item.url" style="color:#fff">{{item.slogan}}</a>
  27. </h4>
  28. </li>
  29. </ul>
  30. </div>
  31. </div>
  32. <div class="resource_img">
  33. <img src="../../assets/image/resource/resource_img.png" class="banner_big" />
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. imgurl: '',
  42. imgtext:'',
  43. video_list: [
  44. { "id": 1, "imgurl": require("../../assets/image/resource/video_img_two.png"), "slogan": '人教版七年级上册 数学 绝对值', "url": '/videodetails?id=1' },
  45. { "id": 2, "imgurl": require("../../assets/image/resource/video_img_three.png"), "slogan": '人教版七年级上册 数学 有理数的分类', "url": '/videodetails?id=2' },
  46. { "id": 3, "imgurl": require("../../assets/image/resource/video_img_four.png"), "slogan": '人教版七年级上册 数学 旋转体', "url": '/videodetails?id=3' },
  47. { "id": 4, "imgurl": require("../../assets/image/resource/video_img_five.png"), "slogan": '人教版七年级上册 数学 方程式', "url": '/videodetails?id=4' },
  48. ],
  49. }
  50. },
  51. created() {
  52. this.init();
  53. },
  54. methods: {
  55. init() {
  56. if (this.$route.path == '/resource') {
  57. this.imgurl = require("../../assets/image/resource/video_img_one.png");
  58. this.imgtext = '人教版七年级上册 数学 正数与负数';
  59. } else if (this.$route.path == '/arearesource') {
  60. this.imgurl = require("../../assets/image/resource/video_area_img.png");
  61. this.imgtext = '人教版 一年级(下册) ';
  62. } else if (this.$route.path == '/schoolresource') {
  63. this.imgurl = require("../../assets/image/resource/video_school_img.jpg");
  64. this.imgtext = '习作·猜猜他是谁';
  65. }
  66. }
  67. }
  68. }
  69. </script>
  70. <style scoped>
  71. .video {
  72. width: 100%;
  73. padding: 0% 11% 0% 11%;
  74. float: left;
  75. background-color: #f3f3f3;
  76. }
  77. .video_box {
  78. width:1200px;
  79. height:455px;
  80. background-color:#fff;
  81. margin:0 auto;
  82. margin-top:20px;
  83. }
  84. .video_title {
  85. width: 70%;
  86. float: left;
  87. padding-left: 30px;
  88. border-bottom: #ececec solid 1px;
  89. }
  90. .video_name {
  91. float: left;
  92. line-height: 39px;
  93. border-bottom: #288add solid 1px;
  94. padding: 12px 5px 0px 5px;
  95. font-size: 24px;
  96. font-weight: normal;
  97. color: #288add;
  98. }
  99. i {
  100. float: left;
  101. margin: 22px 0px 0px 8px;
  102. height: 20px;
  103. line-height: 20px;
  104. border-radius: 10px;
  105. background: #8ea9b9;
  106. font-size: 14px;
  107. padding: 0px 10px;
  108. color: #fff;
  109. }
  110. .video_select {
  111. width: 30%;
  112. float: left;
  113. list-style: none;
  114. border-bottom: #ececec solid 1px;
  115. }
  116. .select_name {
  117. float: left;
  118. width: 15%;
  119. line-height: 39px;
  120. padding: 12px 5px 0px 5px;
  121. font-size: 14px;
  122. color: #6f8abb;
  123. }
  124. .select_name_more {
  125. float: left;
  126. width: 15%;
  127. padding: 0px 5px 0px 5px;
  128. }
  129. .video_list {
  130. width:100%;
  131. height:400px;
  132. float:left;
  133. padding:1.5%;
  134. }
  135. .video_left {
  136. width:50%;
  137. float:left;
  138. position:relative;
  139. }
  140. .video_left img {
  141. width:100%;
  142. }
  143. .video_left:hover .playbtn1 {
  144. display: block;
  145. }
  146. .video_more_list:hover .playbtn1 {
  147. display: block;
  148. }
  149. .playbtn1 {
  150. position: absolute;
  151. top: 50%;
  152. left: 50%;
  153. background: url(../../assets/image/resource/play.png) no-repeat;
  154. width: 64px;
  155. height: 64px;
  156. margin-top: -32px;
  157. margin-left: -32px;
  158. display: none;
  159. }
  160. .name {
  161. position: absolute;
  162. bottom: 5px;
  163. left: 0px;
  164. width: 100%;
  165. font-weight: normal;
  166. line-height: 45px;
  167. font-size: 16px;
  168. background-color: rgba(52, 52, 52, .5);
  169. color: #fff;
  170. }
  171. .name_more {
  172. position: absolute;
  173. bottom: 0px;
  174. left: 0px;
  175. width: 100%;
  176. font-weight: normal;
  177. line-height: 35px;
  178. font-size: 14px;
  179. background-color: rgba(52, 52, 52, .5);
  180. color: #fff;
  181. }
  182. .video_right {
  183. width: 48%;
  184. float: left;
  185. list-style: none;
  186. margin-left:2%;
  187. }
  188. .video_more_list {
  189. width:48%;
  190. float:left;
  191. position:relative;
  192. height:170px;
  193. margin-top:12px;
  194. margin:0.5% 1%;
  195. }
  196. .video_more_list img {
  197. width:100%;
  198. height:170px;
  199. }
  200. .resource_img {
  201. width: 1200px;
  202. padding-top: 30px;
  203. padding-bottom: 30px;
  204. position: relative;
  205. margin: 0 auto;
  206. }
  207. .banner_big {
  208. width: 100%;
  209. }
  210. .sk {
  211. position: absolute;
  212. bottom: 20%;
  213. left: 40%;
  214. }
  215. </style>