index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="trace-container">
  3. <!--我的收藏-->
  4. <view class="collect-container">
  5. <view class="header main-between cross-center" @click="$u.route('/pages/trace/collect')">
  6. <text>我的收藏</text>
  7. <view class="more main-left cross-center">查看全部
  8. <u-icon name="arrow-right" />
  9. </view>
  10. </view>
  11. <!--剧集-->
  12. <view class="content main-left cross-center">
  13. <episode
  14. v-for="(episode,index) in collect"
  15. :key="index"
  16. :episode="episode"
  17. :custom-style="{
  18. marginRight: ((index+1) % 4 !== 0 ? '10rpx' :''),
  19. width: ((710 - 60) / 4 )+'rpx' // 60为间隔 710为 collect-container宽度
  20. }"
  21. :image-style="{
  22. height: '200rpx'
  23. }"
  24. />
  25. </view>
  26. </view>
  27. <!--其他剧集-->
  28. <view class="title">其他剧集</view>
  29. <view
  30. v-for="(item,index) in category"
  31. :key="index"
  32. class="category main-left"
  33. >
  34. <view class="name">动作</view>
  35. <view class="episode-box main-left">
  36. <episode
  37. v-for="(episode,episodeIndex) in collect"
  38. :key="episodeIndex"
  39. :episode="episode"
  40. :custom-style="{
  41. marginRight: ((index+1) % 3 !== 0 ? '10rpx' :''),
  42. width: ((700 - 80) / 3 )+'rpx'
  43. }"
  44. :image-style="{
  45. height: '280rpx'
  46. }"
  47. />
  48. </view>
  49. </view>
  50. <!--tab bar-->
  51. <tab-bar />
  52. </view>
  53. </template>
  54. <script>
  55. import Episode from '../../components/Episode/index'
  56. import TabBar from '../../components/TabBar/index'
  57. export default {
  58. name: 'Trace',
  59. components: { TabBar, Episode },
  60. data() {
  61. return {
  62. collect: [
  63. { name: '毒液', status: '已完结', total: 40 },
  64. { name: '毒液', status: '已完结', total: 40 },
  65. { name: '毒液', status: '已完结', total: 40 }
  66. ],
  67. category: [1, 2, 3]
  68. }
  69. },
  70. computed: {},
  71. methods: {}
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .trace-container {
  76. padding: 20rpx 0;
  77. font-size: 30rpx;
  78. color: $default-color;
  79. .status-box{
  80. margin-top: 10rpx;
  81. color: $info-color;
  82. font-size: 28rpx;
  83. .status{
  84. color: $primary-color;
  85. margin-right: 14rpx;
  86. }
  87. }
  88. .collect-container{
  89. background: #1B203C;
  90. border-radius: 30rpx;
  91. padding: 20rpx;
  92. width: 710rpx;
  93. margin: 0 auto;
  94. .header{
  95. text{
  96. color: $primary-color;
  97. font-size: 38rpx;
  98. font-weight: 800;
  99. }
  100. .more{
  101. color: $info-color;
  102. }
  103. }
  104. .content{
  105. margin-top: 20rpx;
  106. .collect-item{
  107. .cover-image{
  108. image{
  109. width: 200rpx;
  110. height: 280rpx;
  111. }
  112. }
  113. .name{
  114. margin-top: 10rpx;
  115. }
  116. }
  117. }
  118. }
  119. .title{
  120. color: $primary-color;
  121. font-size: 38rpx;
  122. font-weight: 800;
  123. padding: 0 20rpx;
  124. margin: 40rpx 0 30rpx;
  125. }
  126. .category{
  127. margin-bottom: 30rpx;
  128. .name{
  129. background: #284150;
  130. writing-mode: vertical-lr;
  131. padding: 0 20rpx;
  132. border-top-right-radius: 30rpx;
  133. border-bottom-right-radius: 30rpx;
  134. text-align: center;
  135. }
  136. .episode-box{
  137. margin-left: 20rpx;
  138. }
  139. }
  140. }
  141. </style>