xq_page.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <view class="box">
  3. <u-navbar :title="details.title" autoBack :placeholder="true" bgColor="#fee1b9"></u-navbar>
  4. <view class="ban">
  5. <view class="" style="margin-bottom: 30rpx">
  6. <u-swiper :list="bannerlist" imgMode="aspectFill" :height="180" :autoplay="true" :circular="true"></u-swiper>
  7. </view>
  8. <!-- -->
  9. <view class="xq_tit">{{details.title}}</view>
  10. <view class="xq_js">{{details.desc}}</view>
  11. <!-- 报名 -->
  12. <view @click="goRegister()" class="bm_btn">立即报名</view>
  13. <view class="ld">活动详情</view>
  14. <view class="hd_xq">
  15. <u-parse :content="details.content"></u-parse>
  16. <!-- <div>
  17. <text>活动时间:</text>
  18. <text>2024年12月18日</text>
  19. </div>
  20. <div>
  21. <text>活动起点:</text>
  22. <text>翔安区荻花洲</text>
  23. </div>
  24. <div>
  25. <text>报名费用:</text>
  26. <text>免费</text>
  27. </div>
  28. <div style="margin-bottom: 40rpx">
  29. <text>活动流程:</text>
  30. <text>...</text>
  31. </div> -->
  32. </view>
  33. <view class="ld" style="margin-top;: 40rpx">活动日程</view>
  34. <view class="rc_box">
  35. <view style="margin-top: 8rpx">
  36. <u-icon name="clock" color="#57bdc3" size="12"></u-icon>
  37. </view>
  38. <view style="margin-left: 30rpx; color: black">
  39. <view class="">起跑时间</view>
  40. <view class="star_time">8:00 AM</view>
  41. </view>
  42. </view>
  43. <!-- -->
  44. <view class="rc_box">
  45. <view class="yuan"></view>
  46. <view style="margin-left: 30rpx; color: black">
  47. <view class="">路线站点</view>
  48. <view class="star_time">沿途站点</view>
  49. </view>
  50. </view>
  51. <!-- -->
  52. <view class="rc_box">
  53. <view class="yuan"></view>
  54. <view style="margin-left: 30rpx; color: black">
  55. <view class="">文物讲解</view>
  56. <view class="star_time">每个站点的文物讲解</view>
  57. </view>
  58. </view>
  59. <!-- -->
  60. <view class="rc_box">
  61. <view style="margin-top: 8rpx">
  62. <u-icon name="clock" color="#57bdc3" size="12"></u-icon>
  63. </view>
  64. <view style="margin-left: 30rpx; color: black">
  65. <view class="">终点庆祝</view>
  66. <view class="star_time">8:00 AM</view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. //全局定义
  74. let that;
  75. export default {
  76. data() {
  77. return {
  78. details: [],
  79. bannerlist: []
  80. };
  81. },
  82. onLoad(option) {
  83. //启动时赋值
  84. that = this;
  85. console.log(option);
  86. that.getActivityDetails(option.id);
  87. //清掉选择的成员缓存,报名页不清,这边清,避免从选择页进报名页时为空,也避免从本页进去时有参数
  88. uni.removeStorageSync('selectedMembers');
  89. },
  90. methods: {
  91. getActivityDetails(id) {
  92. this.$api.activityDetails(
  93. {
  94. id: id
  95. },
  96. data => {
  97. if (data.code == 0) {
  98. that.$common.errorToShow(data.msg);
  99. return;
  100. } else {
  101. that.details = data.data;
  102. that.bannerlist = data.data.images;
  103. // console.log(that.details);
  104. }
  105. }
  106. );
  107. },
  108. goRegister() {
  109. let id = that.details.id;
  110. let title = that.details.title;
  111. let desc = that.details.desc;
  112. uni.navigateTo({
  113. url: '/index_fenbao/XuanJiangYuan/bm_page?id=' + id + '&title=' + title + '&desc=' + desc
  114. });
  115. }
  116. }
  117. };
  118. </script>
  119. <style>
  120. .box {
  121. height: auto;
  122. width: 100%;
  123. padding-bottom: 50rpx;
  124. background-image: url('https://huli-app.wenlvti.net/app_static/minnanhun/image/gj_bg.png');
  125. background-repeat: repeat-y;
  126. background-size: 100%;
  127. }
  128. .ban {
  129. width: 92%;
  130. margin: auto;
  131. }
  132. .xq_tit {
  133. color: black;
  134. font-size: 32rpx;
  135. font-weight: 700;
  136. }
  137. .xq_js {
  138. color: black;
  139. font-size: 28rpx;
  140. margin-top: 10rpx;
  141. line-height: 40rpx;
  142. height: 160rpx;
  143. overflow: scroll;
  144. }
  145. .bm_btn {
  146. width: 100%;
  147. height: 80rpx;
  148. font-size: 30rpx;
  149. line-height: 80rpx;
  150. text-align: center;
  151. color: #ffffff;
  152. border-radius: 10rpx;
  153. background-color: #fb5a02;
  154. margin-bottom: 60rpx;
  155. }
  156. .ld {
  157. font-size: 30rpx;
  158. font-weight: 700;
  159. margin-bottom: 20rpx;
  160. }
  161. .hd_xq {
  162. color: black;
  163. line-height: 40rpx;
  164. font-size: 26rpx;
  165. margin: 20rpx;
  166. }
  167. .rc_box {
  168. display: flex;
  169. margin-left: 10rpx;
  170. margin-top: 20rpx;
  171. }
  172. .star_time {
  173. color: #928f8f;
  174. font-size: 26rpx;
  175. line-height: 45rpx;
  176. }
  177. .yuan {
  178. width: 16rpx;
  179. height: 16rpx;
  180. border-radius: 50%;
  181. margin-top: 10rpx;
  182. border: 2rpx solid #57bdc3;
  183. }
  184. </style>