Video.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <div class="video-page">
  3. <div class="video-title">
  4. <h3 class="video-title-h3">12月03日直播</h3>
  5. </div>
  6. <div class="video-info">
  7. <div class="video-src">
  8. <video controls="controls" width="800" style="display:block;"
  9. src="https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelcontest/20190516/acalssOne%E7%BD%91%E9%A1%B5%E7%99%BB%E5%BD%95%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95.mp4">
  10. 您的浏览器不支持 video 标签。
  11. </video>
  12. </div>
  13. <div class="video-detail-info">
  14. <Form :label-width="100">
  15. <FormItem label="获奖情况:">
  16. <span>{{routerData.activityAwardName}}</span>
  17. </FormItem>
  18. <FormItem label="主讲:">
  19. <span>{{routerData.employeeName}}</span>
  20. </FormItem>
  21. <FormItem label="单位:">
  22. <span>{{routerData.employeeSchoolName}}</span>
  23. </FormItem>
  24. <FormItem label="年级:">
  25. <span>{{routerData.gradeName}}</span>
  26. </FormItem>
  27. <FormItem label="学科:">
  28. <span>{{routerData.categoryName}}</span>
  29. </FormItem>
  30. <FormItem label="教学设计:">
  31. <!--<span>{{routerData.activityAwardName}}</span>-->
  32. </FormItem>
  33. <FormItem label="教学反思:">
  34. <!--<span>{{routerData.activityAwardName}}</span>-->
  35. </FormItem>
  36. </Form>
  37. <div class="download-video">
  38. <a download="video" style="color:#999999;font-size:14px;" href="https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelcontest/20190516/acalssOne%E7%BD%91%E9%A1%B5%E7%99%BB%E5%BD%95%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95.mp4">
  39. <Icon type="md-cloud-download" size="22" color="white" />
  40. 下载视频
  41. </a>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="video-other">
  46. <h3 class="video-title-h3">推荐作品</h3>
  47. </div>
  48. <div class="videos-wrap">
  49. <div class="video-item" v-for="(item , index) in videos" @click="showVideo(index)">
  50. <img src="../../assets/image/default-act.png" width="95%" />
  51. <p>{{item.title}}</p>
  52. </div>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. import rewardList from '@/static/rewardList.json'
  58. export default {
  59. data() {
  60. return {
  61. routerData: {},
  62. rewardDatas: [],
  63. videos: [
  64. {
  65. title:'12月14日直播'
  66. },
  67. {
  68. title:'12月14日直播'
  69. },
  70. {
  71. title:'12月14日直播'
  72. },
  73. {
  74. title:'12月14日直播'
  75. },
  76. {
  77. title:'12月14日直播'
  78. },
  79. {
  80. title:'12月14日直播'
  81. },
  82. {
  83. title:'12月14日直播'
  84. },
  85. {
  86. title:'12月14日直播'
  87. }
  88. ]
  89. }
  90. },
  91. methods: {
  92. showVideo(index) {
  93. //alert(index);
  94. this.$router.push(
  95. {
  96. name: 'video',
  97. query: {
  98. rewardIndex: index
  99. }
  100. }
  101. );
  102. }
  103. },
  104. mounted() {
  105. let index = this.$route.query.rewardIndex;
  106. //alert(index);
  107. this.rewardDatas = rewardList.data.list;
  108. if (index == undefined) {
  109. this.routerData = this.rewardDatas[0];
  110. } else {
  111. this.routerData = this.rewardDatas[index];
  112. }
  113. },
  114. watch: {
  115. $route() {
  116. let index = this.$route.query.rewardIndex;
  117. //alert(index);
  118. if (index == undefined) {
  119. this.routerData = this.rewardDatas[0];
  120. } else {
  121. this.routerData = this.rewardDatas[index];
  122. }
  123. }
  124. }
  125. }
  126. </script>
  127. <style>
  128. .video-page {
  129. width: 1200px;
  130. margin: 100px auto;
  131. }
  132. .video-title {
  133. margin-bottom: 20px;
  134. height: 20px;
  135. }
  136. .video-title-h3 {
  137. height: 20px;
  138. font-size: 20px;
  139. line-height: 20px;
  140. border-left: 6px solid #37b1fa;
  141. padding-left: 12px;
  142. }
  143. .video-info {
  144. width: 100%;
  145. display: table;
  146. }
  147. .video-detail-info {
  148. width:400px;
  149. background:#222222;
  150. display:table-cell;
  151. vertical-align:top;
  152. padding:20px 10px 20px 30px;
  153. position:relative;
  154. }
  155. .video-detail-info .ivu-form-item {
  156. margin-bottom:8px;
  157. }
  158. .video-detail-info .ivu-form .ivu-form-item-label {
  159. font-size:14px;
  160. color:#999999;
  161. }
  162. .video-detail-info .ivu-form-item-content {
  163. font-size: 14px;
  164. color: #ffffff;
  165. }
  166. .video-src {
  167. display:table-cell;
  168. width:800px;
  169. background:#000000;
  170. }
  171. .download-video {
  172. text-align:center;
  173. position:absolute;
  174. width:100%;
  175. bottom:20px;
  176. left:0;
  177. }
  178. .video-other {
  179. margin-top:20px;
  180. }
  181. .videos-wrap {
  182. margin:0px -10px 0px -10px;
  183. }
  184. .video-item {
  185. width: 25%;
  186. display: inline-block;
  187. padding: 0px 10px;
  188. margin-top:20px;
  189. cursor:pointer;
  190. }
  191. .video-item p {
  192. font-size: 16px;
  193. color: #000;
  194. margin-top: 10px;
  195. text-decoration: none;
  196. text-indent: 8px;
  197. }
  198. </style>