list.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view>
  3. <u-navbar title="2025迎新春活动" :is-back="false"></u-navbar>
  4. <view class="main">
  5. <view class="item" v-for="(item,index) in activityList" :key="index"
  6. @click="toUpdate(item)">
  7. <view class="infos">
  8. <view class="course">
  9. <view class="name">
  10. ddbddb
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="btn">
  17. <button @click="toAdd">报 名</button>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import * as activityApi from '@/apis/parents/activity.js'
  23. export default {
  24. data() {
  25. return {
  26. activityList: []
  27. }
  28. },
  29. onReady() {
  30. this.getActivityList();
  31. },
  32. methods: {
  33. toUpdate(item) {
  34. uni.navigateTo({
  35. url: '/pages/parents/activity/add?id=' + item.id
  36. })
  37. },
  38. toAdd() {
  39. uni.navigateTo({
  40. url: '/pages/parents/activity/add'
  41. })
  42. },
  43. getActivityList() {
  44. uni.showLoading({
  45. title: "加载中",
  46. mask: true,
  47. })
  48. activityApi.pageList({
  49. name: '',
  50. pageIndex: 1,
  51. pageSize: 1000
  52. }).then((response) => {
  53. uni.hideLoading();
  54. }).catch(error => {
  55. uni.showToast({
  56. title: error,
  57. icon: "none"
  58. })
  59. })
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .main {
  66. margin-top:88rpx;
  67. .item {
  68. .date {
  69. padding: 24rpx 32rpx;
  70. color: rgba(119, 119, 119, 1);
  71. }
  72. .infos {
  73. background-color: #fff;
  74. padding: 24rpx 36rpx;
  75. display: flex;
  76. align-items: center;
  77. .picture {
  78. width: 92rpx;
  79. height: 92rpx;
  80. img {
  81. width: 100%;
  82. height: 100%;
  83. }
  84. }
  85. .course {
  86. margin-left: 24rpx;
  87. .name {
  88. color: rgba(51, 51, 51, 1);
  89. font-size: 16px;
  90. font-weight: bold;
  91. }
  92. .season-hour {
  93. display: flex;
  94. color: rgba(119, 119, 119, 1);
  95. margin-top: 8rpx;
  96. .hour {
  97. margin-left: 8rpx;
  98. }
  99. }
  100. }
  101. .price {
  102. color: rgba(16, 16, 16, 1);
  103. font-size: 18px;
  104. font-weight: bold;
  105. margin-left: auto;
  106. }
  107. }
  108. }
  109. }
  110. .btn {
  111. padding: 20rpx 0;
  112. background-color: #fff;
  113. position: fixed;
  114. bottom: 0;
  115. left: 0;
  116. right: 0;
  117. button {
  118. width: 91.4%;
  119. border-radius: 50px;
  120. background-color: rgba(13, 186, 199, 1);
  121. color: rgba(255, 255, 255, 1);
  122. font-size: 16px;
  123. line-height: 80rpx;
  124. }
  125. }
  126. </style>