index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <template>
  2. <div class="video-list">
  3. <div
  4. class="video"
  5. v-for="(item, index) in list"
  6. :key="index"
  7. @click="onPlay(item)"
  8. >
  9. <div class="cover">
  10. <img :src="item.cover" alt="" />
  11. <div class="name">{{ item.title }}</div>
  12. <div class="rank" :class="'rank-0' + (index + 1)">
  13. {{ index + 1 }}
  14. </div>
  15. <div class="play" @click="onPlay(item)"></div>
  16. </div>
  17. <div class="info">
  18. <div class="club-name">{{ item.authParty }}</div>
  19. <div class="mobile">{{ item.userName | mobileFormat }}</div>
  20. </div>
  21. <div class="foot">
  22. <div class="date">{{ item.releaseTime | dateFormat }}</div>
  23. <div class="praise">{{ item.diggCount }}</div>
  24. <div class="pv">{{ item.playCount }}</div>
  25. </div>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. export default {
  31. props: {
  32. list: {
  33. type: Array,
  34. default: () => [],
  35. },
  36. },
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. @media screen and (min-width: 768px) {
  41. .video-list {
  42. &::after {
  43. content: '';
  44. display: block;
  45. clear: both;
  46. }
  47. .video {
  48. float: left;
  49. width: 288px;
  50. height: 356px;
  51. background: #fff;
  52. box-sizing: border-box;
  53. border: 1px solid #efefef;
  54. margin: 0 16px 16px 0;
  55. transition: all 0.4s;
  56. &:hover {
  57. transform: translateY(-10px);
  58. box-shadow: 0px 6px 16px 1px rgba(0, 0, 0, 0.1);
  59. .info {
  60. .club-name {
  61. color: #f3920d;
  62. }
  63. }
  64. }
  65. &:nth-child(4n) {
  66. margin-right: 0;
  67. }
  68. .cover {
  69. width: 100%;
  70. height: 198px;
  71. position: relative;
  72. img {
  73. display: block;
  74. width: 100%;
  75. height: 100%;
  76. }
  77. &::after {
  78. content: '';
  79. display: block;
  80. position: absolute;
  81. left: 0;
  82. top: 0;
  83. z-index: 1;
  84. width: 100%;
  85. height: 100%;
  86. background: #000;
  87. opacity: 0;
  88. transition: opacity 0.2s;
  89. }
  90. .play {
  91. position: absolute;
  92. z-index: 2;
  93. width: 48px;
  94. height: 48px;
  95. background: url(~assets/theme-images/common/pc-icon-play.png)
  96. no-repeat center;
  97. background-size: 48px;
  98. left: 50%;
  99. top: 50%;
  100. transform: translate(-50%, -50%);
  101. opacity: 0;
  102. transition: opacity 0.2s;
  103. cursor: pointer;
  104. }
  105. &:hover {
  106. .play {
  107. opacity: 1;
  108. }
  109. .rank,
  110. .name {
  111. opacity: 0;
  112. }
  113. &::after {
  114. opacity: 0.4;
  115. }
  116. }
  117. .name {
  118. color: #fff;
  119. font-size: 16px;
  120. text-align: center;
  121. width: 100%;
  122. line-height: 40px;
  123. @include ellipsis(1);
  124. box-sizing: border-box;
  125. padding: 0 16px;
  126. position: absolute;
  127. left: 0;
  128. bottom: 0;
  129. background: rgba(0, 0, 0, 0.5);
  130. transition: opacity 0.2s;
  131. }
  132. .rank {
  133. position: absolute;
  134. left: 10px;
  135. top: 0;
  136. width: 43px;
  137. height: 45px;
  138. background: url(~assets/theme-images/ross/pc-rank.png) no-repeat
  139. center;
  140. background-size: 43px;
  141. text-align: center;
  142. box-sizing: border-box;
  143. padding-top: 13px;
  144. font-weight: bold;
  145. color: #fff;
  146. font-size: 13px;
  147. transition: opacity 0.2s;
  148. &.rank-01 {
  149. background-image: url(~assets/theme-images/ross/pc-rank-01.png);
  150. }
  151. &.rank-02 {
  152. background-image: url(~assets/theme-images/ross/pc-rank-02.png);
  153. }
  154. &.rank-03 {
  155. background-image: url(~assets/theme-images/ross/pc-rank-03.png);
  156. }
  157. }
  158. }
  159. .info {
  160. padding: 24px 16px;
  161. .club-name {
  162. font-size: 18px;
  163. color: #282828;
  164. @include ellipsis(1);
  165. }
  166. .mobile {
  167. font-size: 16px;
  168. color: #666;
  169. margin-top: 12px;
  170. }
  171. }
  172. .foot {
  173. color: #999999;
  174. font-size: 14px;
  175. display: flex;
  176. justify-content: space-between;
  177. align-items: center;
  178. margin: 0 16px;
  179. border-top: 1px solid #efefef;
  180. padding-top: 12px;
  181. .date,
  182. .praise,
  183. .pv {
  184. flex-shrink: 0;
  185. line-height: 24px;
  186. }
  187. .praise,
  188. .pv {
  189. position: relative;
  190. margin-left: 16px;
  191. padding-left: 30px;
  192. &::after {
  193. content: '';
  194. display: block;
  195. width: 24px;
  196. height: 24px;
  197. background: url(~assets/theme-images/common/icon-praise.png)
  198. no-repeat center;
  199. background-size: 24px;
  200. position: absolute;
  201. left: 0;
  202. top: 50%;
  203. transform: translateY(-50%);
  204. }
  205. }
  206. .pv {
  207. &::after {
  208. background-image: url(~assets/theme-images/common/icon-pv.png);
  209. }
  210. }
  211. .date {
  212. margin-right: 44px;
  213. }
  214. }
  215. }
  216. }
  217. }
  218. </style>