menu.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view class="safeArea">
  3. <view class="menuWrap">
  4. <view class="videoMain">
  5. <video id="myVideo" src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4" @error="videoErrorCallback" :danmu-list="danmuList" enable-danmu danmu-btn controls></video>
  6. <view class="videoTitle">
  7. <view class="left">承发包模式-施工合同与物资采购合...</view>
  8. <view class="right">
  9. <u-icon class="icon" name="file-text"></u-icon>讲义
  10. </view>
  11. </view>
  12. <u-line color="#EEEEEE" />
  13. <view class="tabMain" style="width: 100%;text-align: center;">
  14. <u-tabs :list="menuList" sticky :current="current" @change="change" active-color="#333" inactive-color="#999"></u-tabs>
  15. </view>
  16. </view>
  17. <view class="menuMain">
  18. <view class="menuItem" v-for="(item,index) in 3" :key="index">
  19. <view class="title">2Z106000 施工合同管理-模块标题</view>
  20. <u-collapse accordion>
  21. <u-collapse-item>
  22. <text slot="title" class="u-page__item__title__slot-title">2Z106010 施工承发包的模式-2Z106020 施工合同...</text>
  23. <view class="u-collapse-content">
  24. <view class="item" v-for="(item,index) in 7" :key="index">
  25. <view class="tag">录播</view><!--默认蓝色,红色加red,黄色加yellow-->
  26. <!-- <view class="yellow">回放</view> -->
  27. <!-- <view class="red">直播</view> -->
  28. <view class="info">施工承发包模式-施工合同与物资标题过长...</view>
  29. <view class="btn">待重修</view>
  30. <view class="status">回放</view>
  31. </view>
  32. </view>
  33. </u-collapse-item>
  34. </u-collapse>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import { mapGetters } from 'vuex';
  42. export default {
  43. components: {
  44. },
  45. data() {
  46. return {
  47. current: 0,
  48. menuList: [
  49. {
  50. name: '重修目录'
  51. },
  52. {
  53. name: '目录'
  54. },
  55. {
  56. name: '笔记'
  57. },
  58. {
  59. name: '答疑'
  60. }
  61. ]
  62. };
  63. },
  64. onShow() {
  65. },
  66. methods: {
  67. change(index){
  68. this.current = index;
  69. }
  70. },
  71. onReachBottom() {},
  72. computed: { ...mapGetters(['userInfo']) }
  73. };
  74. </script>
  75. <style lang="scss">
  76. page {
  77. background: #EAEEF1;
  78. }
  79. .videoMain .u-scroll-box{
  80. display: flex;
  81. }
  82. .menuItem{
  83. .u-collapse-item{
  84. position: relative;
  85. }
  86. .u-arrow-down-icon{
  87. position: absolute;
  88. left:19rpx;
  89. }
  90. .u-page__item__title__slot-title{
  91. width: 563rpx;
  92. font-size: 24rpx;
  93. font-family: PingFang SC;
  94. font-weight: bold;
  95. color: #666666;
  96. white-space: nowrap;
  97. text-overflow: ellipsis;
  98. overflow: hidden;
  99. padding-left: 90rpx;
  100. }
  101. }
  102. </style>
  103. <style scoped lang="scss">
  104. .videoMain{
  105. width:100%;
  106. background: #fff;
  107. #myVideo{
  108. width:100%;
  109. height: 461rpx;
  110. background: #000000;
  111. vertical-align: top;
  112. }
  113. .videoTitle{
  114. height: 80rpx;
  115. background: #FFFFFF;
  116. display: flex;
  117. align-items: center;
  118. justify-content: space-between;
  119. .left{
  120. width: 550rpx;
  121. font-size: 30rpx;
  122. font-family: PingFang SC;
  123. font-weight: bold;
  124. color: #333333;
  125. white-space: nowrap;
  126. text-overflow: ellipsis;
  127. overflow: hidden;
  128. padding-left: 32rpx;
  129. }
  130. .right{
  131. width: 100rpx;
  132. height: 80rpx;
  133. background: #FFFFFF;
  134. box-shadow: -4rpx 0 4rpx 0rpx rgba(0, 0, 0, 0.1);
  135. text-align: center;
  136. line-height: 1.2;
  137. font-size: 20rpx;
  138. font-family: PingFang SC;
  139. font-weight: 500;
  140. color: #333333;
  141. padding-top: 4rpx;
  142. .icon{
  143. display: block;
  144. font-size: 36rpx;
  145. color:#007AFF;
  146. vertical-align: top;
  147. }
  148. }
  149. }
  150. .u-scroll-box{
  151. display: flex;
  152. }
  153. }
  154. .menuMain{
  155. padding: 16rpx;
  156. .menuItem{
  157. background: #FFFFFF;
  158. border-radius: 16rpx;
  159. margin-bottom: 24rpx;
  160. padding-bottom: 30rpx;
  161. .title{
  162. padding: 33rpx 16rpx 0;
  163. font-size: 30rpx;
  164. font-family: PingFang SC;
  165. font-weight: bold;
  166. color: #333333;
  167. }
  168. .item{
  169. display: flex;
  170. padding: 28rpx 16rpx;
  171. align-items: center;
  172. justify-content: space-between;
  173. position: relative;
  174. &:first-child{
  175. &::after{
  176. width:686rpx;
  177. left:16rpx;
  178. }
  179. }
  180. &::after{
  181. content: '';
  182. width: 90%;
  183. height:1px;
  184. background: #EEEEEE;
  185. position: absolute;
  186. top: 0;
  187. right:0;
  188. }
  189. .tag{
  190. width: 56rpx;
  191. height: 28rpx;
  192. background: #FFFFFF;
  193. border: 2rpx solid #007AFF;
  194. border-radius: 8rpx;
  195. font-size: 20rpx;
  196. font-family: PingFang SC;
  197. font-weight: 400;
  198. color: #007AFF;
  199. display: flex;
  200. align-items: center;
  201. justify-content: center;
  202. }
  203. .info{
  204. width: 504rpx;
  205. font-size: 26rpx;
  206. font-family: PingFang SC;
  207. font-weight: bold;
  208. color: #007AFF;
  209. white-space: nowrap;
  210. text-overflow: ellipsis;
  211. overflow: hidden;
  212. }
  213. .btn{
  214. width: 80rpx;
  215. height: 28rpx;
  216. background: #FF3B30;
  217. border-radius: 8rpx;
  218. font-size: 20rpx;
  219. font-family: PingFang SC;
  220. font-weight: 400;
  221. color: #FFFFFF;
  222. display: flex;
  223. align-items: center;
  224. justify-content: center;
  225. }
  226. .status{
  227. position: absolute;
  228. bottom: 1rpx;
  229. left: 96rpx;
  230. font-size: 20rpx;
  231. font-family: PingFang SC;
  232. font-weight: 400;
  233. color: #FF3B30;
  234. }
  235. }
  236. }
  237. }
  238. .yellow{
  239. color: #FF9500!important;
  240. border-color: #FF9500!important;;
  241. }
  242. .red{
  243. color: #FF3B30!important;
  244. border-color: #FF3B30!important;;
  245. }
  246. </style>