menu.vue 5.3 KB

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