detail.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <template>
  2. <view class="content">
  3. <view class="video-wrap">
  4. <video :src="could_play?'https://api.myjie.cn/static/viedo/ddd.mp4':''" id="videoId" class="top-video"
  5. :enable-progress-gesture="false" poster="https://api.myjie.cn/resource/user/user1/fw1.png"></video>
  6. <!-- 视频蒙版 -->
  7. <!-- <view class="mask" v-if="!could_play" @click.stop=""></view> -->
  8. </view>
  9. <view class="nav flex">
  10. <view class="nav-item" v-for="(item,index) in navList" @click="navClick(index)"
  11. :class="{'action': index == currentIndex}">
  12. {{item.title}}
  13. </view>
  14. </view>
  15. <!-- 详情 -->
  16. <view class="" v-if="currentIndex == 0">
  17. <view class="base-info">
  18. <view class="info-tit">
  19. 深度了解阿强是个大傻逼
  20. </view>
  21. <view class="info-info flex">
  22. <view class="info-item">
  23. 课程:共10节
  24. </view>
  25. <view class="hx">
  26. </view>
  27. <view class="info-item">
  28. 人数:522人学习
  29. </view>
  30. </view>
  31. </view>
  32. <view class="jianjie">
  33. <view class="jianjie-top flex">
  34. <view class="hx">
  35. </view>
  36. <view class="">
  37. 课程简介
  38. </view>
  39. <view class="hx">
  40. </view>
  41. </view>
  42. <view class="" v-html="content">
  43. </view>
  44. </view>
  45. <view class="tjkc">
  46. <view class="jianjie-top flex" style="border-bottom: #c8c7cc solid 1px;">
  47. <view class="hx">
  48. </view>
  49. <view class="">
  50. 推荐课程
  51. </view>
  52. <view class="hx">
  53. </view>
  54. </view>
  55. <view class="kc-list">
  56. <view class="kc-item flex" v-for="item in 10">
  57. <image src="" mode="" class="kc-img"></image>
  58. <view class="kc-info">
  59. <view class="info-tit clamp">
  60. 母婴行业必学舞蹈(邓晏老师视频)
  61. </view>
  62. <view class="info-cate clamp">
  63. 技术控必练习
  64. </view>
  65. <view class="info-info flex">
  66. <view class="rs">
  67. 100
  68. </view>
  69. <view class="visit">
  70. 555555
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <!-- 课程目录 -->
  79. <view class="" v-if="currentIndex == 1">
  80. <view class="kc-ml">
  81. <view class="ml-item flex">
  82. <view class="bs"></view>
  83. <view class="">
  84. 备孕必检查项目介绍【备孕系列课程】/3备孕必检查项目介绍【备孕系列课程】/3
  85. </view>
  86. </view>
  87. <view class="ml-item flex">
  88. <view class="bs"></view>
  89. <view class="">
  90. 备孕必检查项目介绍【备孕系列课程】/3
  91. </view>
  92. </view>
  93. <view class="ml-item flex">
  94. <view class="bs"></view>
  95. <view class="">
  96. 备孕必检查项目介绍【备孕系列课程】/3
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. <!-- 全部课程 -->
  102. <view class="" v-if="currentIndex == 2">
  103. <view class="tjkc">
  104. <view class="kc-list">
  105. <view class="kc-item flex" v-for="item in 10">
  106. <image src="" mode="" class="kc-img"></image>
  107. <view class="kc-info">
  108. <view class="info-tit clamp">
  109. 母婴行业必学舞蹈(邓晏老师视频)
  110. </view>
  111. <view class="info-cate clamp">
  112. 技术控必练习
  113. </view>
  114. <view class="info-info flex">
  115. <view class="rs">
  116. 100
  117. </view>
  118. <view class="visit">
  119. 555555
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. </template>
  129. <script>
  130. export default {
  131. data() {
  132. return {
  133. content: '<p>ddddddd</p>',
  134. currentIndex: 0,
  135. could_play: false,
  136. navList: [{
  137. title: '详情'
  138. }, {
  139. title: '课程目录'
  140. },
  141. {
  142. title: '讲师全部课程'
  143. }
  144. ]
  145. };
  146. },
  147. computed: {
  148. videoContext() {
  149. return uni.createVideoContext('videoId', this)
  150. }
  151. },
  152. onLoad(opt) {
  153. },
  154. onShow() {
  155. },
  156. onReachBottom() {
  157. },
  158. methods: {
  159. navClick(index) {
  160. this.currentIndex = index
  161. }
  162. }
  163. };
  164. </script>
  165. <style lang="scss" scoped>
  166. .video-wrap {
  167. margin: 20rpx 0;
  168. position: relative;
  169. .top-video {
  170. width: 750rpx;
  171. }
  172. .mask {
  173. position: absolute;
  174. top: 0;
  175. left: 0;
  176. width: 100%;
  177. height: 100%;
  178. z-index: 999;
  179. // background-color: red;
  180. }
  181. }
  182. .nav {
  183. width: 750rpx;
  184. height: 88rpx;
  185. .nav-item {
  186. line-height: 88rpx;
  187. width: 50%;
  188. text-align: center;
  189. font-size: 30rpx;
  190. font-weight: 500;
  191. color: #333333;
  192. height: 100%;
  193. }
  194. .action {
  195. font-weight: bold;
  196. position: relative;
  197. color: $base-color;
  198. }
  199. background-color: #fff;
  200. }
  201. .base-info {
  202. width: 710rpx;
  203. margin: 20rpx auto;
  204. background-color: #fff;
  205. font-size: 28rpx;
  206. .info-tit {
  207. color: #333;
  208. text-align: center;
  209. border-bottom: 1px solid #eee;
  210. padding: 20rpx;
  211. }
  212. .info-info {
  213. color: #666;
  214. .info-item {
  215. flex-grow: 1;
  216. text-align: center;
  217. padding: 20rpx 0;
  218. }
  219. .hx {
  220. width: 1rpx;
  221. height: 40rpx;
  222. background-color: #eee;
  223. }
  224. }
  225. }
  226. .jianjie {
  227. width: 710rpx;
  228. margin: 20rpx auto 0;
  229. background-color: #fff;
  230. padding: 20rpx;
  231. }
  232. .jianjie-top {
  233. font-size: 36rpx;
  234. color: $base-color;
  235. justify-content: center;
  236. padding: 40rpx 0 20rpx;
  237. .hx {
  238. width: 30rpx;
  239. height: 1px;
  240. background-color: $base-color;
  241. margin: 0 20rpx;
  242. }
  243. }
  244. .tjkc {
  245. width: 710rpx;
  246. background-color: #fff;
  247. margin: 20rpx auto;
  248. }
  249. .kc-list {
  250. padding: 0 30rpx;
  251. border-bottom: #c8c7cc solid 1px;
  252. .kc-item {
  253. border-bottom: #c8c7cc solid 1px;
  254. padding: 22rpx 0;
  255. justify-content: flex-start;
  256. .kc-img {
  257. flex-shrink: 0;
  258. width: 266rpx;
  259. height: 164rpx;
  260. margin-right: 20rpx;
  261. background-color: #eee;
  262. }
  263. .kc-info {
  264. height: 164rpx;
  265. width: 360rpx;
  266. display: flex;
  267. flex-direction: column;
  268. justify-content: space-between;
  269. align-items: flex-start;
  270. // background-color: red;
  271. .info-tit {
  272. width: 100%;
  273. font-size: 32rpx;
  274. color: #000;
  275. }
  276. .info-cate {
  277. width: 100%;
  278. color: #ff5a97;
  279. font-size: 28rpx;
  280. }
  281. .info-info {
  282. width: 360rpx;
  283. font-size: 24rpx;
  284. .rs {
  285. color: #8f8f94;
  286. }
  287. .visit {
  288. color: $base-color;
  289. }
  290. }
  291. }
  292. }
  293. }
  294. .kc-ml {
  295. padding: 30rpx;
  296. width: 710rpx;
  297. margin: 20rpx auto;
  298. background-color: #fff;
  299. .ml-item {
  300. align-items: flex-start;
  301. justify-content: flex-start;
  302. margin-bottom: 40rpx;
  303. .bs {
  304. flex-shrink: 0;
  305. width: 40rpx;
  306. height: 40rpx;
  307. border-radius: 50%;
  308. border: 1px solid #5FB878;
  309. margin-right: 20rpx;
  310. }
  311. }
  312. }
  313. </style>