huoDong.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view class="box">
  3. <u-navbar title="活动" :autoBack="true" bgColor="#ffffff" :placeholder="true" titleStyle="font-weight:bold;color:#121212"></u-navbar>
  4. <view class="box_top">
  5. <view @click="timeShow = true" class="top_item">
  6. <view class="">{{ timeValCom }}</view>
  7. <view class="">
  8. <uni-icons type="bottom" size="20"></uni-icons>
  9. </view>
  10. </view>
  11. <view @click="locationShow = true" class="top_item">
  12. <view class="">{{ locationValCom }}</view>
  13. <view class="">
  14. <uni-icons type="bottom" size="20"></uni-icons>
  15. </view>
  16. </view>
  17. <view @click="stateShow = true" class="top_item">
  18. <view class="">{{ stateValCom }}</view>
  19. <view class="">
  20. <uni-icons type="bottom" size="20"></uni-icons>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 时间 -->
  25. <u-picker @confirm="timeBtn" @cancel="timeShow = false" :show="timeShow" :columns="timeList" closeOnClickOverlay></u-picker>
  26. <!-- 地点 -->
  27. <u-picker @confirm="locationBtn" @cancel="locationShow = false" :show="locationShow" :columns="locationList" closeOnClickOverlay></u-picker>
  28. <!-- 状态 -->
  29. <u-picker @confirm="stateBtn" @cancel="stateShow = false" :show="stateShow" :columns="stateList" closeOnClickOverlay></u-picker>
  30. <!-- 活动内容 -->
  31. <view @click="detailsBtn" class="box_ban">
  32. <view class="box_left">
  33. <image style="width: 100%; height: 100%" src="https://huli-app.wenlvti.net/app_static/minnanhun/image/kctp.png"></image>
  34. </view>
  35. <view class="box_right">
  36. <view class="tit">公益创投|厦门小海星”我和星星有个约”国防夏令营</view>
  37. <view class="btm">
  38. <view class="time">2023-10-30 8:00</view>
  39. <view class="baom">报名中</view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data() {
  48. return {
  49. timeVal: '',
  50. locationVal: '',
  51. stateVal: '',
  52. timeShow: false /* 时间 */,
  53. locationShow: false /* 地点 */,
  54. stateShow: false /* 状态 */,
  55. timeList: [['今天', '昨天', '一周前']],
  56. locationList: [['殿前', '高殿', '中铺']],
  57. stateList: [['报名中', '报名截至']]
  58. };
  59. },
  60. computed: {
  61. timeValCom() {
  62. return this.timeVal ? this.timeVal : '时间';
  63. },
  64. locationValCom() {
  65. return this.locationVal ? this.locationVal : '地点';
  66. },
  67. stateValCom() {
  68. return this.stateVal ? this.stateVal : '状态';
  69. }
  70. },
  71. methods: {
  72. timeBtn(e) {
  73. console.log(e);
  74. this.timeVal = e.value;
  75. this.timeShow = false;
  76. },
  77. locationBtn(e) {
  78. this.locationVal = e.value;
  79. this.locationShow = false;
  80. },
  81. stateBtn(e) {
  82. this.stateVal = e.value;
  83. this.stateShow = false;
  84. },
  85. // 活动详情
  86. detailsBtn() {
  87. uni.navigateTo({
  88. url: '/xueyuan_fenbao/zhuangJia/huodongXq'
  89. });
  90. },
  91. close() {
  92. this.timeShow = false;
  93. this.locationShow = false;
  94. this.stateShow = false;
  95. }
  96. }
  97. };
  98. </script>
  99. <style>
  100. .box {
  101. height: auto;
  102. width: 100%;
  103. background-color: #f8f8f8;
  104. background-attachment: fixed;
  105. position: relative;
  106. display: flex;
  107. flex-direction: column;
  108. }
  109. .box_top {
  110. height: 80rpx;
  111. display: flex;
  112. background-color: #ffffff;
  113. margin-top: 40rpx;
  114. justify-content: space-around;
  115. line-height: 80rpx;
  116. }
  117. .top_item {
  118. display: flex;
  119. height: 100%;
  120. }
  121. .box_ban {
  122. display: flex;
  123. background-color: #ffffff;
  124. margin: 40rpx 32rpx 0 32rpx;
  125. }
  126. .box_left {
  127. width: 307rpx;
  128. height: 170rpx;
  129. border-radius: 10rpx;
  130. }
  131. .box_right {
  132. width: 340rpx;
  133. padding-top: 20rpx;
  134. margin-left: 18rpx;
  135. }
  136. .tit {
  137. width: 100%;
  138. height: 74rpx;
  139. font-size: 28rpx;
  140. color: #312520;
  141. margin-bottom: 20rpx;
  142. text-overflow: -o-ellipsis-lastline;
  143. overflow: hidden;
  144. text-overflow: ellipsis;
  145. display: -webkit-box;
  146. -webkit-line-clamp: 2;
  147. line-clamp: 2;
  148. -webkit-box-orient: vertical;
  149. }
  150. .btm {
  151. width: 96%;
  152. display: flex;
  153. align-items: center;
  154. justify-content: space-between;
  155. }
  156. .time {
  157. font-size: 24rpx;
  158. color: #666666;
  159. }
  160. .baom {
  161. font-size: 28rpx;
  162. color: #ca5642;
  163. }
  164. </style>