t-o-news-tab-3 - 固定背景图版本.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view>
  3. <view class="list">
  4. <view class="item" v-for="(item,index) in list" :key="index">
  5. <view class="title">{{item.title}}</view>
  6. <view class="box">
  7. <view class="box_item" v-for="(item_2,index_2) in item.special_list" :key="index_2" @click="go_h5(item_2.id)">
  8. <view class="time">有效时间:{{item_2.start_time}}——{{item_2.end_time}}</view>
  9. <view class="inner">
  10. <view class="left">
  11. {{item_2.name}}
  12. </view>
  13. <view class="right" @click.stop="go_rank(item_2.id)">
  14. <image src="./icon/btn.png"></image>
  15. </view>
  16. </view>
  17. <view class="bottom">
  18. <view class="line">
  19. <view class="line_box" :style="{width: + item_2.percent_complete + '%'}"></view>
  20. </view>
  21. <view class="num">{{item_2.percent_complete}}%</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. name: "t-o-news-tab-3",
  32. data() {
  33. return {
  34. list: [],
  35. };
  36. },
  37. created() {
  38. this.get_jigsawPuzzle_specialList()
  39. },
  40. methods: {
  41. get_jigsawPuzzle_specialList() {
  42. this.$api.jigsawPuzzle_specialList({
  43. }).then((res) => {
  44. // console.log(res.data.data)
  45. const data = res.data.data
  46. // data.forEach((item, index) => {
  47. // this.list = this.list.concat(item.special_list)
  48. // })
  49. this.list = res.data.data
  50. // console.log(this.list)
  51. })
  52. },
  53. go_h5(id) {
  54. uni.navigateTo({
  55. url: "../../origanization/news/tab_3/h5/h5?id="+id
  56. })
  57. },
  58. go_rank(id){
  59. uni.navigateTo({
  60. url:"../../origanization/news/tab_3/ranking/ranking?id="+id
  61. })
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss">
  67. .list {
  68. box-sizing: border-box;
  69. padding: 0 25rpx;
  70. .item {
  71. margin-top: 60rpx;
  72. width: 700rpx;
  73. margin-bottom: 20rpx;
  74. box-sizing: border-box;
  75. padding: 20rpx;
  76. padding-top: 60rpx;
  77. background: #FFFFFF;
  78. border: 3rpx solid #202492;
  79. border-radius: 20rpx;
  80. position: relative;
  81. .title{
  82. position: absolute;
  83. top: -35rpx;
  84. left: 50rpx;
  85. width: 250rpx;
  86. height: 70rpx;
  87. line-height: 70rpx;
  88. border-radius: 10rpx;
  89. background-image: url(./icon/title.png);
  90. background-size: cover;
  91. background-repeat: no-repeat;
  92. text-align: center;
  93. font-size: 42rpx;
  94. font-family: FZLanTingHeiS-B-GB;
  95. font-weight: 700;
  96. color: #00A0E8;
  97. text-shadow: 3rpx 5rpx 4rpx rgba(0, 103, 150, 0.76);
  98. -webkit-text-stroke: 1rpx #FFFFFF;
  99. text-stroke: 1rpx #FFFFFF;
  100. }
  101. .box{
  102. .box_item{
  103. margin-bottom: 20rpx;
  104. background-image: url(./icon/bg.png);
  105. background-size: 100% 100%;
  106. background-repeat: no-repeat;
  107. border-radius: 20rpx;
  108. box-sizing: border-box;
  109. padding: 20rpx 30rpx;
  110. .time{
  111. display: inline-block;
  112. background-color: #FBDF33;
  113. box-sizing: border-box;
  114. padding: 5rpx 10rpx;
  115. font-size: 24rpx;
  116. border: 1rpx solid #000000;
  117. box-shadow: 0rpx 3rpx 0rpx 0rpx rgba(0, 76, 110, 0.61);
  118. border-radius: 20rpx;
  119. }
  120. .inner{
  121. margin-top: 20rpx;
  122. display: flex;
  123. justify-content: space-between;
  124. align-items: center;
  125. .left{
  126. color: #FFFFFF;
  127. }
  128. .right{
  129. margin-left: 20rpx;
  130. image{
  131. width: 76rpx;
  132. height: 76rpx;
  133. display: block;
  134. }
  135. }
  136. }
  137. .bottom {
  138. margin-top: 20rpx;
  139. display: flex;
  140. align-items: center;
  141. .line {
  142. width:520rpx;
  143. height: 6rpx;
  144. background-color: #E4E4E4;
  145. border-radius: 10rpx;
  146. .line_box {
  147. width: 36%;
  148. height: 6rpx;
  149. background-color: #00FFFF;
  150. border-radius: 10rpx;
  151. }
  152. }
  153. .num {
  154. margin-left: 10rpx;
  155. font-size: 24rpx;
  156. color: #FFFFFF;
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. </style>