detail.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <template >
  2. <div class="video_detail_contianer">
  3. <el-container>
  4. <el-aside width="284px">
  5. <div class="aside_header">
  6. <span>CONTACT</span>
  7. <span>章节目录</span>
  8. </div>
  9. <div class="aside_content">
  10. <el-tree ref="treeBox" :data="contentData" :props="defaultProps" :highlight-current="true" :default-expanded-keys="expandId" :default-checked-keys="childrenId" node-key="id" @node-click="treeNodeClick"></el-tree>
  11. </div>
  12. </el-aside>
  13. <el-main>
  14. <evaluation-title :title="`${routeParams.name}`" navBackButton />
  15. <div class="video_wrap">
  16. <div class="videoplay">
  17. <div class="video">
  18. <mx-video :aliIdType="aliIdType" :src="videoId"></mx-video>
  19. </div>
  20. </div>
  21. <div class="text">
  22. <span :class="{ info_active: infoActive == 1 }" @click="infoActive = 1">课程概要</span>
  23. <span :class="{ info_active: infoActive == 2 }" @click="infoActive = 2">课时介绍</span>
  24. <span :class="{ info_active: infoActive == 3 }" @click="infoActive = 3">主要讲师</span>
  25. </div>
  26. </div>
  27. <!-- 视频 信息 -->
  28. <div class="video_info">
  29. <!-- 课程概要 -->
  30. <div class="summary" v-show="infoActive == 1">
  31. <div class="summary_tit">
  32. {{ videoInfo.title }}
  33. </div>
  34. <div class="vis_totle">
  35. <img src="@/assets/images/icon_eye.png" alt="" />
  36. <span>{{ routeParams.count }}人已观看</span>
  37. </div>
  38. </div>
  39. <!-- 课时介绍 -->
  40. <div class="introduce" v-show="infoActive == 2">
  41. <div class="introduce_tit">散文阅读之显性内容</div>
  42. <div class="introduce_con">
  43. 各龙地却意制心收北叫示系者受志术叫叫该名光前劳基外通任体给温律太术社维问住角金议计数原科压么广速会好真商太数再还话种受王样率人为很反现严号约正生。写越花机还件口原受术标心需场象设开族着半风角不代运斯党派看回量类林集天学山员连地准真王几联。走海号音节身外期先管新直验美信所千料状到南民状西又统达交通无因指再五条给商今计生线斯至流还类业法认。
  44. </div>
  45. </div>
  46. <!-- 主要讲师 -->
  47. <div class="teacher" v-show="infoActive == 3">
  48. <el-col :span="5">
  49. <div class="teacher_info">
  50. <img src="@/assets/images/teacher_avatar.png" alt="" />
  51. <span style="font-weight: 600; color: #343434; margin: 6px 0">Andre Long</span>
  52. <span>哈佛大学精英讲师</span>
  53. </div>
  54. </el-col>
  55. <el-col :span="14">
  56. <div class="teacher_ach">
  57. <div style="color: #ffa400; margin-bottom: 8px">教学成就</div>
  58. <div class="teacher_ach_info">
  59. <div class="ach_item">“全球交科研先进个人”获得者</div>
  60. <div class="ach_item">“全球交科研先进个人”获得者</div>
  61. <div class="ach_item">全球十大杰出精英讲师</div>
  62. <div class="ach_item">全球十大杰出精英讲师</div>
  63. <div class="ach_item">全球十大杰出精英讲师</div>
  64. <div class="ach_item">全球十大杰出精英讲师</div>
  65. <div class="ach_item">全球十大杰出精英讲师</div>
  66. <div class="ach_item">全球十大杰出精英讲师</div>
  67. </div>
  68. </div>
  69. </el-col>
  70. </div>
  71. </div>
  72. </el-main>
  73. </el-container>
  74. </div>
  75. </template>
  76. <script>
  77. import { videoInfo, getVideoPlayAuth } from "@/api/webApi/webVideo";
  78. import aliplayer from "../../videocourse/compoent/aliplayer.vue";
  79. import transferMixin from '@/components/mx-transfer-mixin'
  80. export default {
  81. mixins: [transferMixin],
  82. components: { aliplayer },
  83. data() {
  84. return {
  85. routeParams: {},
  86. infoActive: 1,
  87. contentData: [],
  88. defaultProps: {
  89. children: "children",
  90. label: "name",
  91. },
  92. expandId: [], // 默认展开的节点id
  93. childrenId: [], // 默认选中的节点id
  94. checkNode: {}, //选中的节点
  95. videoInfo: {},
  96. videoId: ''
  97. };
  98. },
  99. created() {
  100. const hasPrevData = !!Object.keys(this.prevData).length
  101. this.routeParams = hasPrevData ? this.prevData : this.$route.query;
  102. // Mock树节点
  103. this.contentData = [this.routeParams];
  104. this.expandId = [this.routeParams.id];
  105. this.childrenId = [this.routeParams.id];
  106. this.aliIdType = this.routeParams.aliIdType;
  107. this.videoId = this.routeParams.aliid;
  108. },
  109. methods: {
  110. handle() {
  111. //
  112. },
  113. treeNodeClick(node) {
  114. if (node.children && node.children.length) {
  115. return;
  116. }
  117. this.checkNode = data;
  118. },
  119. },
  120. };
  121. </script>
  122. <style scoped>
  123. .video_detail_contianer {
  124. padding: 20px;
  125. min-height: 100vh;
  126. background: #f7f7f7;
  127. }
  128. .el-main {
  129. padding: 7px 8px;
  130. background: #fff;
  131. }
  132. .aside_header {
  133. background: white;
  134. display: flex;
  135. flex-direction: column;
  136. justify-content: flex-end;
  137. padding: 24px 16px 0 16px;
  138. margin-bottom: 16px;
  139. }
  140. .el-aside {
  141. background: white;
  142. padding: 0;
  143. margin-bottom: 0;
  144. margin-right: 16px;
  145. }
  146. .aside_header span {
  147. margin-top: 5px;
  148. width: 84px;
  149. height: 22px;
  150. font-size: 16px;
  151. font-family: PingFangSC-Medium, PingFang SC;
  152. font-weight: 500;
  153. color: #343434;
  154. line-height: 22px;
  155. }
  156. .aside_header span:first-child {
  157. width: 173px;
  158. height: 27px;
  159. background: linear-gradient(180deg, #ffffff 0%, #47c6a2 100%);
  160. opacity: 0.5;
  161. }
  162. .video_wrap {
  163. border-bottom: 10px solid #f7f7f7;
  164. }
  165. .video_wrap video {
  166. width: 100%;
  167. height: 566px;
  168. }
  169. .text {
  170. padding-left: 32px;
  171. }
  172. .text span {
  173. cursor: pointer;
  174. width: 64px;
  175. font-size: 16px;
  176. font-family: PingFangSC-Medium, PingFang SC;
  177. font-weight: 600;
  178. color: #343434;
  179. margin-right: 16px;
  180. position: relative;
  181. padding: 32px 0 25px 0;
  182. display: inline-block;
  183. }
  184. .video_info {
  185. width: 100%;
  186. height: 172px;
  187. background: #ffffff;
  188. border-radius: 4px;
  189. padding-top: 28px;
  190. padding-left: 32px;
  191. font-size: 14px;
  192. font-family: PingFangSC-Medium, PingFang SC;
  193. font-weight: 500;
  194. color: #343434;
  195. }
  196. .info_active::after {
  197. content: "";
  198. width: 0px;
  199. height: 0px;
  200. border-width: 10px;
  201. border-style: solid;
  202. border-color: transparent transparent #47c6a2 transparent;
  203. position: absolute;
  204. bottom: -10px;
  205. left: 50%;
  206. transform: translateX(-50%);
  207. }
  208. .video_info {
  209. border-top: 4px solid #47c6a2;
  210. border-radius: 4px 4px 0px 0px;
  211. }
  212. .summary_tit {
  213. margin-bottom: 16px;
  214. }
  215. .vis_totle {
  216. display: flex;
  217. flex-direction: row;
  218. align-items: center;
  219. }
  220. .vis_totle img {
  221. margin-right: 6px;
  222. }
  223. .introduce .introduce_tit {
  224. height: 20px;
  225. font-size: 14px;
  226. font-family: PingFangSC-Medium, PingFang SC;
  227. font-weight: 600;
  228. color: #343434;
  229. line-height: 20px;
  230. margin-bottom: 12px;
  231. }
  232. .introduce_con {
  233. height: 66px;
  234. font-size: 14px;
  235. font-family: PingFangSC-Regular, PingFang SC;
  236. font-weight: 400;
  237. color: #727272;
  238. line-height: 22px;
  239. }
  240. .teacher_info {
  241. display: flex;
  242. flex-direction: column;
  243. align-items: center;
  244. }
  245. .teacher_ach_info {
  246. display: flex;
  247. flex-wrap: wrap;
  248. }
  249. .teacher_ach_info .ach_item {
  250. margin-bottom: 4px;
  251. flex: 50%;
  252. height: 20px;
  253. font-family: PingFangSC-Regular, PingFang SC;
  254. font-weight: 400;
  255. color: #797979;
  256. line-height: 20px;
  257. font-size: 14px;
  258. }
  259. .el-tree {
  260. overflow: scroll;
  261. height: 600px;
  262. scroll-margin: 20px;
  263. overflow-x: hidden;
  264. }
  265. ::-webkit-scrollbar {
  266. width: 4px;
  267. }
  268. ::-webkit-scrollbar-thumb {
  269. -webkit-box-shadow: inset 0 0 1px rgba(136, 136, 136, 0.3);
  270. background-color: rgb(238, 241, 245);
  271. }
  272. </style>
  273. <style >
  274. .el-tree-node__content {
  275. padding-top: 6px;
  276. padding-bottom: 6px;
  277. height: 32px;
  278. font-size: 14px;
  279. font-family: PingFangSC-Medium, PingFang SC;
  280. font-weight: 500;
  281. color: #343434;
  282. line-height: 20px;
  283. }
  284. .el-tree-node {
  285. padding-left: 16px;
  286. }
  287. .el-tree-node__expand-icon.expanded {
  288. content: "";
  289. }
  290. .el-tree-node__content > .el-tree-node__expand-icon {
  291. padding: 6px;
  292. /* position: absolute; */
  293. right: 16px;
  294. }
  295. .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
  296. color: #47c6a2;
  297. }
  298. </style>