huoDong.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="我的活动" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <view class="order-list" v-if="signupActivityList.length > 0">
  5. <view class="item" @click="details(item.id)" v-for="(item,index) in signupActivityList" :key="index">
  6. <view class="no">
  7. <view><text class="label">活动:</text><text>{{item.activity_title}}</text></view>
  8. <text class="create-time"></text>
  9. </view>
  10. <view class="order-content">
  11. <view class="pay-item">
  12. <view>
  13. <text class="label">姓名:</text>
  14. <text>{{item.name}}</text>
  15. </view>
  16. <view style="text-align: right;">
  17. <text class="label">手机号:</text>
  18. <text>{{item.mobile}}</text>
  19. </view>
  20. </view>
  21. <view class="pay-item">
  22. <view>
  23. <text class="label">活动时段:</text>
  24. <text>{{item.start_time}}~{{item.end_time}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="footer">
  29. <text class="price">¥{{item.price}}</text>
  30. <view class="status">
  31. <text class="label">订单状态:</text><text>{{item.status_text}}</text>
  32. <!-- <button @click="details(item.id)" class="cu-btn round bg-gradual-orange"
  33. v-if="item.status ==='0'">去付款</button>
  34. <button @click="cancelGym" class="cu-btn round bg-gradual-orange"
  35. v-if="item.status==1">取消订单</button> -->
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <u-empty v-else text="暂未报名活动" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"></u-empty>
  41. </view>
  42. </template>
  43. <script>
  44. let that;
  45. export default {
  46. onLoad(option) {
  47. that = this;
  48. },
  49. onShow(option) {
  50. that.getUserSignupActivity();
  51. },
  52. data() {
  53. return {
  54. signupActivityList: []
  55. };
  56. },
  57. methods: {
  58. details(id) {
  59. console.log('details')
  60. uni.navigateTo({
  61. url: '/user_fenbao/huoDong/details?id=' + id
  62. });
  63. },
  64. getUserSignupActivity() {
  65. this.$api.getUserSignupActivity(
  66. {
  67. },
  68. data => {
  69. if (data.code == 0) {
  70. that.$common.errorToShow(data.msg);
  71. return;
  72. } else {
  73. that.signupActivityList = data.data;
  74. // console.log(that.bannerlist);
  75. }
  76. }
  77. );
  78. },
  79. }
  80. };
  81. </script>
  82. <style lang="scss" scoped>
  83. .box {
  84. width: 100%;
  85. padding-bottom: 50rpx;
  86. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xbg_2.png');
  87. background-size: 100% 100%;
  88. background-attachment: fixed;
  89. background-repeat: repeat-y;
  90. height: 100%;
  91. .order-list {
  92. .label {
  93. display: inline-block;
  94. margin-right: 6rpx;
  95. }
  96. .item {
  97. background: #f9f9f9;
  98. color: #000;
  99. margin: 20rpx;
  100. font-size: 24rpx;
  101. border-radius: 10rpx;
  102. border: 5rpx solid #fde6d2;
  103. .label {
  104. color: #000;
  105. }
  106. .no {
  107. border-bottom: 2rpx solid #cfcfcf;
  108. display: flex;
  109. padding: 20rpx;
  110. .create-time {
  111. flex: 1;
  112. text-align: right;
  113. }
  114. }
  115. .footer {
  116. padding: 20rpx;
  117. display: flex;
  118. align-items: center;
  119. .price {
  120. color: #4e4e4e;
  121. font-weight: 600;
  122. }
  123. .status {
  124. flex: 1;
  125. text-align: right;
  126. }
  127. u-button {
  128. margin-left: 20rpx;
  129. }
  130. }
  131. .order-content {
  132. border-bottom: 2rpx solid #cfcfcf;
  133. padding-top: 20rpx;
  134. .pay-item {
  135. padding: 0 20rpx;
  136. margin-bottom: 20rpx;
  137. display: flex;
  138. >view {
  139. flex: 1;
  140. }
  141. }
  142. }
  143. }
  144. }
  145. }
  146. </style>