video.vue 5.6 KB

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