t-o-news-tab-3 - 新版UI副本.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <view>
  3. <view class="list">
  4. <view class="item" v-for="(item,index) in list" :key="index" @click="go_h5(item.id)">
  5. <view class="left">
  6. <image
  7. src="https://cdn.colorhub.me/WVXVGE4diOu9Yss0DxCy_j-YfGBA4xDRwsos4PyE_Jk/rs:auto:280:0:0/g:ce/bG9jYWw6Ly8vOTkv/N2QvMGVjMDQ0MGY4/ZDkyZWU4ZTdmMDg0/YjM4MzUxNDI5MTMz/ZGM5OTk3ZC5qcGVn.jpg"
  8. mode="aspectFill"></image>
  9. </view>
  10. <view class="right">
  11. <view class="title">
  12. <view class="name">{{item.name}}</view>
  13. <view class="tip">拼图</view>
  14. </view>
  15. <view class="text"></view>
  16. <view class="content">
  17. <view class="time">{{item.start_time}}</view>
  18. <view class="box">
  19. <view class="line">
  20. <view class="line_box" :style="{width: + item.percent_complete + '%'}"></view>
  21. </view>
  22. <view class="num">{{item.percent_complete}}%</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. name: "t-o-news-tab-3",
  33. data() {
  34. return {
  35. list: []
  36. };
  37. },
  38. created() {
  39. this.get_jigsawPuzzle_specialList()
  40. },
  41. methods: {
  42. get_jigsawPuzzle_specialList() {
  43. this.$api.jigsawPuzzle_specialList({
  44. }).then((res) => {
  45. console.log(res.data.data)
  46. const data = res.data.data
  47. data.forEach((item, index) => {
  48. this.list = this.list.concat(item.special_list)
  49. })
  50. })
  51. },
  52. go_h5(id) {
  53. uni.navigateTo({
  54. url: "../../origanization/news/tab_3/h5/h5?id="+id
  55. })
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .list {
  62. box-sizing: border-box;
  63. padding: 0 25rpx;
  64. .item {
  65. width: 700rpx;
  66. margin-bottom: 20rpx;
  67. box-sizing: border-box;
  68. padding: 20rpx;
  69. padding-top: 24rpx;
  70. background-color: #FFFFFF;
  71. display: flex;
  72. .left {
  73. width: 180rpx;
  74. image {
  75. width: 180rpx;
  76. height: 180rpx;
  77. border-radius: 10rpx;
  78. }
  79. }
  80. .right {
  81. width: 450rpx;
  82. margin-left: 20rpx;
  83. .title {
  84. display: flex;
  85. justify-content: space-between;
  86. align-items: center;
  87. .name {
  88. font-size: 26rpx;
  89. color: #f39800;
  90. overflow: hidden;
  91. white-space: nowrap;
  92. text-overflow: ellipsis;
  93. }
  94. .tip {
  95. width: 75rpx;
  96. text-align: center;
  97. font-size: 24rpx;
  98. color: #f39800;
  99. border: 1rpx solid #f39800;
  100. border-radius: 10rpx;
  101. }
  102. }
  103. .text {
  104. height: 80rpx;
  105. margin-top: 8rpx;
  106. font-size: 28rpx;
  107. text-overflow: -o-ellipsis-lastline;
  108. overflow: hidden;
  109. text-overflow: ellipsis;
  110. display: -webkit-box;
  111. -webkit-line-clamp: 2;
  112. line-clamp: 2;
  113. -webkit-box-orient: vertical;
  114. }
  115. .content {
  116. .time {
  117. margin-right: 60rpx;
  118. text-align: right;
  119. font-size: 24rpx;
  120. color: #999999;
  121. }
  122. .box {
  123. display: flex;
  124. align-items: center;
  125. .line {
  126. width: 400rpx;
  127. height: 6rpx;
  128. background-color: #E4E4E4;
  129. border-radius: 10rpx;
  130. .line_box {
  131. width: 36%;
  132. height: 6rpx;
  133. background-color: #009FE8;
  134. border-radius: 10rpx;
  135. }
  136. }
  137. .num {
  138. margin-left: 10rpx;
  139. font-size: 24rpx;
  140. color: #009FE8;
  141. }
  142. }
  143. }
  144. }
  145. }
  146. }
  147. </style>