index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <template>
  2. <view class="main">
  3. <view class="search">
  4. <text>亚太视频</text>
  5. <u-search height="30" bgColor="#FFF" :showAction="false" placeholder="请输入剧名" searchIconColor="#000"></u-search>
  6. </view>
  7. <view class="playlets">
  8. <view class="ranks">
  9. <u-tabs :list="tabs" @click="click" :activeStyle="{
  10. color: '#303133',
  11. fontWeight: 'bold',
  12. transform: 'scale(1.05)'
  13. }"
  14. :inactiveStyle="{
  15. color: '#606266',
  16. transform: 'scale(1)'
  17. }"
  18. itemStyle="padding-right: 15px; height: 34px;"></u-tabs>
  19. </view>
  20. <view class="rank_list">
  21. <view class="list-item" v-for="(item,index) in list" :key="index">
  22. <view class="cover">
  23. <image class="cover_img" src=""></image>
  24. <view :class="`grade${index}`" class="grade">{{index+1}}</view>
  25. <view class="hot">
  26. <pv-icon name="icon-huomiao" color='#fff' :customStyle="{ fontSize: '24rpx'}"></pv-icon>
  27. <text>12.8W</text>
  28. </view>
  29. </view>
  30. <view class="names">
  31. <text>大夏第一赘婿</text>
  32. <text>陈晓童瑶首搭守护小日子</text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="play_types">
  38. <view class="type_item" v-for="(item,index) in typeLists" :key="index">
  39. <view class="title">{{item.name}}</view>
  40. <view class="watches">
  41. <view class="watch-item" v-for="(wai,ind) in item.list" :key="ind">
  42. <view class="cover">
  43. <image class="cover_img" src=""></image>
  44. <view class="uphot">
  45. <text>更新至12集</text>
  46. <view class="hot">
  47. <pv-icon name="icon-huomiao" color='#fff' :customStyle="{ fontSize: '26rpx'}"></pv-icon>
  48. <text>12.8W</text>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="names">
  53. <text>小日子</text>
  54. <text>陈晓童瑶首搭守护小日子</text>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. tabs: [
  67. { name: '热剧榜' },
  68. { name: '男生榜' },
  69. { name: '女生榜' },
  70. ],
  71. list:[
  72. {
  73. name:'大夏第一赘婿'
  74. },
  75. {
  76. name:'永安梦'
  77. },
  78. {
  79. name:'分手后回寒门'
  80. },
  81. ],
  82. typeLists:[
  83. {
  84. name:'都市逆袭',
  85. list:[
  86. {name:'小日子'},
  87. {name:'永安梦'},
  88. {name:'烈焰'},
  89. {name:'目中无人'},
  90. ]
  91. },
  92. {
  93. name:'现代言情',
  94. list:[
  95. {name:'小日子'},
  96. {name:'永安梦'},
  97. {name:'烈焰'},
  98. {name:'目中无人'},
  99. ]
  100. },
  101. ]
  102. }
  103. },
  104. onLoad() {
  105. },
  106. methods: {
  107. }
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. .main{
  112. background: #3C7FFC;
  113. padding-bottom: var(--window-bottom);
  114. .search{
  115. height: 88rpx;
  116. display: flex;
  117. align-items: center;
  118. padding: 0 24rpx;
  119. text{
  120. color: #fff;
  121. font-weight: bold;
  122. margin-right: 44rpx;
  123. }
  124. }
  125. .playlets{
  126. background: linear-gradient( 180deg, #FFF6DE 0%, #FFFFFF 100%);
  127. border-radius: 24rpx 24rpx 0 0;
  128. padding: 22rpx 36rpx;
  129. .ranks{
  130. margin-bottom: 20rpx;
  131. }
  132. .rank_list{
  133. display: flex;
  134. justify-content: space-between;
  135. align-items: center;
  136. .list-item{
  137. width: 216rpx;
  138. .cover{
  139. position: relative;
  140. .cover_img{
  141. width: 100%;
  142. height: 276rpx;
  143. border-radius: 16rpx;
  144. background: #3C7FFC;
  145. }
  146. .grade{
  147. text-align: center;
  148. line-height: 32rpx;
  149. width: 28rpx;
  150. height: 32rpx;
  151. border-radius: 8rpx;
  152. position: absolute;
  153. color: #713B03;
  154. font-size: 24rpx;
  155. font-weight: bold;
  156. top: 0;
  157. right: 0;
  158. }
  159. .grade0{
  160. background: linear-gradient( 90deg, #FFBB3E 0%, #FFCE1C 100%);
  161. }
  162. .grade1{
  163. background: linear-gradient( 90deg, #FFF2DA 0%, #FFDC5E 100%);
  164. }
  165. .grade2{
  166. background: linear-gradient( 90deg, #FFEBC6 0%, #FFF4CE 100%);
  167. }
  168. .hot{
  169. position: absolute;
  170. left: 12rpx;
  171. bottom: 8rpx;
  172. text {
  173. font-size: 24rpx;
  174. color: #fff;
  175. margin-left: 8rpx;
  176. }
  177. }
  178. }
  179. .names{
  180. margin-top: 40rpx;
  181. display: flex;
  182. flex-direction: column;
  183. text:nth-child(1){
  184. color: #2A2D32;
  185. font-size: 28rpx;
  186. font-weight: 500;
  187. }
  188. text:nth-child(2){
  189. color: #636267;
  190. font-size: 24rpx;
  191. font-weight: 400;
  192. }
  193. }
  194. }
  195. }
  196. }
  197. .play_types{
  198. background: #fff;
  199. padding: 32rpx 36rpx 0;
  200. .type_item{
  201. .title{
  202. font-weight: bold;
  203. font-size: 36rpx;
  204. color: #2A2D32;
  205. margin-bottom: 28rpx;
  206. }
  207. .watches{
  208. display: flex;
  209. flex-wrap: wrap;
  210. justify-content: space-between;
  211. .watch-item{
  212. width: 336rpx;
  213. margin-bottom: 40rpx;
  214. .cover{
  215. position: relative;
  216. .cover_img{
  217. width: 100%;
  218. height: 216rpx;
  219. border-radius: 16rpx;
  220. background: #3C7FFC;
  221. }
  222. .uphot{
  223. padding: 12rpx;
  224. width: 100%;
  225. position: absolute;
  226. bottom: 0;
  227. left: 0;
  228. display: flex;
  229. justify-content: space-between;
  230. font-size: 24rpx;
  231. color: #FFFFFF;
  232. text{
  233. }
  234. .hot{
  235. }
  236. }
  237. }
  238. .names{
  239. margin-top: 20rpx;
  240. display: flex;
  241. flex-direction: column;
  242. text:nth-child(1){
  243. color: #2A2D32;
  244. font-size: 28rpx;
  245. font-weight: 500;
  246. }
  247. text:nth-child(2){
  248. color: #636267;
  249. font-size: 24rpx;
  250. font-weight: 400;
  251. }
  252. }
  253. }
  254. }
  255. }
  256. }
  257. }
  258. </style>