t-o-news-tab-3.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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">
  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. }
  59. }
  60. </script>
  61. <style lang="scss">
  62. .list {
  63. box-sizing: border-box;
  64. padding: 0 25rpx;
  65. .item {
  66. margin-top: 60rpx;
  67. width: 700rpx;
  68. margin-bottom: 20rpx;
  69. box-sizing: border-box;
  70. padding: 20rpx;
  71. padding-top: 60rpx;
  72. background: #FFFFFF;
  73. border: 3rpx solid #202492;
  74. border-radius: 20rpx;
  75. position: relative;
  76. .title{
  77. position: absolute;
  78. top: -35rpx;
  79. left: 50rpx;
  80. width: 250rpx;
  81. height: 70rpx;
  82. line-height: 70rpx;
  83. border-radius: 10rpx;
  84. background-image: url(./icon/title.png);
  85. background-size: cover;
  86. background-repeat: no-repeat;
  87. text-align: center;
  88. font-size: 42rpx;
  89. font-family: FZLanTingHeiS-B-GB;
  90. font-weight: 700;
  91. color: #00A0E8;
  92. text-shadow: 3rpx 5rpx 4rpx rgba(0, 103, 150, 0.76);
  93. -webkit-text-stroke: 1rpx #FFFFFF;
  94. text-stroke: 1rpx #FFFFFF;
  95. }
  96. .box{
  97. .box_item{
  98. margin-bottom: 20rpx;
  99. background-image: url(./icon/bg.png);
  100. background-size: 100% 100%;
  101. background-repeat: no-repeat;
  102. box-sizing: border-box;
  103. padding: 20rpx 30rpx;
  104. .time{
  105. display: inline-block;
  106. background-color: #FBDF33;
  107. box-sizing: border-box;
  108. padding: 5rpx 10rpx;
  109. font-size: 24rpx;
  110. border: 1rpx solid #000000;
  111. box-shadow: 0rpx 3rpx 0rpx 0rpx rgba(0, 76, 110, 0.61);
  112. border-radius: 20rpx;
  113. }
  114. .inner{
  115. margin-top: 20rpx;
  116. display: flex;
  117. justify-content: space-between;
  118. align-items: center;
  119. .left{
  120. color: #FFFFFF;
  121. }
  122. .right{
  123. margin-left: 20rpx;
  124. image{
  125. width: 76rpx;
  126. height: 76rpx;
  127. display: block;
  128. }
  129. }
  130. }
  131. .bottom {
  132. margin-top: 20rpx;
  133. display: flex;
  134. align-items: center;
  135. .line {
  136. width:520rpx;
  137. height: 6rpx;
  138. background-color: #E4E4E4;
  139. border-radius: 10rpx;
  140. .line_box {
  141. width: 36%;
  142. height: 6rpx;
  143. background-color: #00FFFF;
  144. border-radius: 10rpx;
  145. }
  146. }
  147. .num {
  148. margin-left: 10rpx;
  149. font-size: 24rpx;
  150. color: #FFFFFF;
  151. }
  152. }
  153. }
  154. }
  155. }
  156. }
  157. </style>