activityYear.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view>
  3. <u-navbar title="活动中心奖励"></u-navbar>
  4. <view class="commend-box" v-for="(item,i) in list" :key="i" @click="ckItem(item)">
  5. <view class="commend-content">
  6. <view class="title">
  7. <view class="title1">查看{{item}}年活动奖励<span v-if="listObj[item]!==''" style="margin-left: 8px;">( {{listObj[item]}} )</span></view>
  8. </view>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import * as API from '@/apis/pagejs/activity.js'
  15. export default {
  16. data() {
  17. return {
  18. title:'',
  19. type:'',
  20. listForm:{
  21. pageIndex:1,
  22. pageSize:20,
  23. },
  24. list:[],
  25. listObj:{},
  26. recordsTotal:0,
  27. tabList: [{
  28. name: '全部'
  29. }, {
  30. name: '荣誉类型'
  31. }, {
  32. name: '荣誉类型',
  33. }],
  34. current: 0
  35. }
  36. },
  37. onLoad(op){
  38. for (var i=2024;i>=2023;i--){
  39. this.list.push(i)
  40. this.getList(i)
  41. }
  42. },
  43. onReachBottom() {
  44. },
  45. methods: {
  46. getList(key){
  47. API.pageList({
  48. pageIndex:1,
  49. pageSize:0,
  50. year:key,
  51. isTeam:this.listForm.isTeam
  52. }).then((res) => {
  53. this.listObj[key]=res.data.recordsTotal
  54. this.$forceUpdate()
  55. //var num=res.data.recordsTotal;
  56. }).catch(error => {
  57. })
  58. },
  59. ckItem(item){
  60. var url=`/pages/staffHome/activityReward/activityReward?year=${item}`;
  61. uni.navigateTo({
  62. url:url
  63. })
  64. },
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .tabs{
  70. background-color: rgba(255, 255, 255, 1);
  71. // /deep/.u-tabs{
  72. // width: 408rpx;
  73. // }
  74. margin-bottom: 24rpx;
  75. }
  76. .commend-box{
  77. background-color: #fff;
  78. border-radius: 8px;
  79. margin: 24rpx 32rpx 24rpx 32rpx;
  80. padding: 36rpx;
  81. display: flex;
  82. justify-content: space-between;
  83. .commend-content{
  84. width: 100%;
  85. .title{
  86. color: rgba(51, 51, 51, 1);
  87. font-size: 42rpx;
  88. font-family: 'Medium';
  89. display: flex;
  90. justify-content: space-between;
  91. align-items: baseline;
  92. .title1{
  93. min-width: 430rpx;
  94. //font-weight: bold;
  95. padding-left: 4px;
  96. //padding-bottom: 4px;
  97. }
  98. .title2{
  99. width: 30%;
  100. text-align: right;
  101. }
  102. }
  103. .commendation{
  104. color: rgba(119, 119, 119, 1);
  105. font-size: 12px;
  106. line-height: 17px;
  107. margin-top: 4rpx;
  108. padding: 8rpx 0px;
  109. //width: 430rpx;
  110. }
  111. .commendationMy{
  112. }
  113. .integralMain{
  114. display: flex;
  115. justify-content: space-between;
  116. .text2{
  117. vertical-align: middle;
  118. padding-top: 14rpx;
  119. margin-top: 10rpx;
  120. font-size: 32rpx;
  121. }
  122. }
  123. .integral{
  124. font-family: 'Regular';
  125. margin-top: 14rpx;
  126. display: flex;
  127. align-items: center;
  128. justify-content: center;
  129. background-color: rgba(230, 239, 255, 1);
  130. //width: 260rpx;
  131. border-radius: 50px;
  132. height: 28px;
  133. font-size: 24rpx;
  134. .icon{
  135. width: 32rpx;
  136. height: 32rpx;
  137. img{
  138. width: 100%;
  139. }
  140. }
  141. .text{
  142. font-size: 24rpx;
  143. color: rgba(119, 119, 119, 1);
  144. }
  145. }
  146. }
  147. .gainer{
  148. img{
  149. width: 136rpx;
  150. height: 140rpx;
  151. border-radius: 50px;
  152. }
  153. .name{
  154. text-align: center;
  155. color: rgba(51, 51, 51, 1);
  156. font-family: 'Regular';
  157. }
  158. }
  159. }
  160. </style>