index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view>
  3. <view class="application-record" v-if="listData.length">
  4. <navigator :url="`/pages/activity/registrate_activity/index?id=${item.activity_id}`" hover-class='none' class="card-list" v-for="item in listData" :key="item.activity_id" v-if="item.activity">
  5. <view class="card-top">
  6. <view class="card-wrapper">
  7. <view class="card-status" :class="'status'+item.activity.time_status">{{item.activity.time_status==0?'未开始' : item.activity.time_status==1?'正在进行' : '已结束'}}</view>
  8. <view class="btn">详情<text class='iconfont icon-jiantou'></text></view>
  9. </view>
  10. </view>
  11. <view v-if="item.activity" class="card-bottom">
  12. <view class="title">{{item.activity.activity_name}}</view>
  13. <view class="time">提交时间:{{item.create_time}}</view>
  14. </view>
  15. </navigator>
  16. </view>
  17. <view class='no-shop' v-if="!listData.length && !loading">
  18. <view class='pictrue' style="margin: 0 auto;">
  19. <image :src="`${domain}/static/images/noCart.png`"></image>
  20. <text>暂无活动,快去提交报名信息吧!</text>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. // +----------------------------------------------------------------------
  27. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  28. // +----------------------------------------------------------------------
  29. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  30. // +----------------------------------------------------------------------
  31. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  32. // +----------------------------------------------------------------------
  33. // | Author: CRMEB Team <admin@crmeb.com>
  34. // +----------------------------------------------------------------------
  35. import {
  36. getRechargeRecordList
  37. } from '@/api/user.js'
  38. import {HTTP_REQUEST_URL} from '@/config/app';
  39. export default {
  40. data() {
  41. return {
  42. domain:HTTP_REQUEST_URL,
  43. loading: false,
  44. listData: [],
  45. count: 0,
  46. pageData: {
  47. page: 1,
  48. limit: 10,
  49. }
  50. }
  51. },
  52. onLoad() {
  53. this.getListData()
  54. },
  55. methods: {
  56. getListData() {
  57. this.loading = true
  58. uni.showLoading({
  59. title: '数据加载中',
  60. });
  61. getRechargeRecordList(this.pageData).then(res => {
  62. this.count = res.data.count
  63. this.listData = this.listData.concat(res.data.list)
  64. uni.hideLoading();
  65. this.loading = false
  66. })
  67. },
  68. },
  69. // 滚动到底部
  70. onReachBottom() {
  71. if (this.count == this.listData.length) {
  72. uni.showToast({
  73. title: '没有更多啦',
  74. icon: 'none',
  75. duration: 1000
  76. });
  77. } else {
  78. this.pageData.page += 1
  79. this.getListData()
  80. }
  81. },
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .application-record {
  86. display: flex;
  87. flex-direction: column;
  88. align-items: center;
  89. background-color: #F5F5F5;
  90. padding: 30rpx 30rpx;
  91. .card-list {
  92. width: 100%;
  93. background-color: #fff;
  94. padding: 20rpx 24rpx;
  95. margin-bottom: 30rpx;
  96. border-radius: 16rpx;
  97. .card-top{
  98. .card-wrapper{
  99. display: flex;
  100. align-items: center;
  101. justify-content: space-between;
  102. border-bottom: 1px solid #EEEEEE;
  103. padding-bottom: 30rpx;
  104. .card-status{
  105. font-size: 28rpx;
  106. &.status1{
  107. color: #61CE74;
  108. }
  109. &.status-1{
  110. color: #FF922C;
  111. }
  112. }
  113. .btn{
  114. color:#666666;
  115. .iconfont{
  116. color: #bbbbbb;
  117. font-size: 22rpx;
  118. margin-left: 5rpx;
  119. }
  120. }
  121. }
  122. }
  123. .card-bottom {
  124. margin-top: 30rpx;
  125. .title {
  126. font-size: 28rpx;
  127. font-weight: bold;
  128. color: #333333;
  129. }
  130. .time {
  131. color: #999999;
  132. font-size: 24rpx;
  133. margin-top: 24rpx;
  134. }
  135. }
  136. }
  137. }
  138. .no-shop {
  139. width: 100%;
  140. background-color: #fff;
  141. height: 100vh;
  142. .pictrue {
  143. display: flex;
  144. flex-direction: column;
  145. align-items: center;
  146. color: $uni-nothing-text;
  147. image {
  148. width: 414rpx;
  149. height: 380rpx;
  150. }
  151. }
  152. }
  153. </style>