index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <template>
  2. <view class="box">
  3. <u-navbar title="厦门文物跑" :placeholder="true" bgColor="#ffe1b8" autoBack></u-navbar>
  4. <view class="ban">
  5. <view @click="goSignup" class="" style="margin-bottom: 30rpx">
  6. <u-swiper :list="bannerlist" imgMode="aspectFill" :height="150" :autoplay="true" :circular="true"></u-swiper>
  7. </view>
  8. <!-- 报名按钮 -->
  9. <view class="bm_box" @click="goSignup">
  10. <view class="">
  11. <view class="bm_js">文物跑,聆听历史的声音</view>
  12. <view class="bm_js2">跑出文化 跑出健康、跑出生态、跑出...</view>
  13. </view>
  14. <view class="goto">立即报名</view>
  15. </view>
  16. <!-- 简介 -->
  17. <view class="ld">活动简介</view>
  18. <view class="jj_box">
  19. 厦门文物跑活动旨在打造一场具有文化认同感的跑步之旅,号召公众关注及保护珍贵文物古迹,用脚步丈量城市历史,打造全民守护历史记忆的社会正能量。迎着第一缕曙光,从各自文物游线路起点出发,按照规划路线,跑..
  20. </view>
  21. <!-- 亮点 -->
  22. <view class="ld">活动亮点</view>
  23. <view class="list_box">
  24. <view class="list_item" v-for="item in 4" :key="item">
  25. <img
  26. style="width: 100%; height: 200rpx; border-radius: 10rpx"
  27. src="https://img2.baidu.com/it/u=443975182,626431415&fm=253&fmt=auto&app=120&f=JPEG?w=627&h=418"
  28. />
  29. <view class="item_tit">专属路线</view>
  30. </view>
  31. </view>
  32. <!-- 优秀讲员 -->
  33. <view class="xjy" @click="gdxjyBtn">
  34. <view class="ld">优秀宣讲员</view>
  35. <view class="gd">更多</view>
  36. </view>
  37. <view class="list_box">
  38. <view @click="xqBtn" class="list_item" v-for="item in 4" :key="item">
  39. <img
  40. style="width: 100%; height: 200rpx; border-radius: 10rpx"
  41. src="https://img2.baidu.com/it/u=443975182,626431415&fm=253&fmt=auto&app=120&f=JPEG?w=627&h=418"
  42. />
  43. <view class="item_name">徐有群</view>
  44. </view>
  45. </view>
  46. <!-- 优秀讲员 -->
  47. <view class="xjy">
  48. <view class="ld">精彩回顾</view>
  49. <view class="gd">更多</view>
  50. </view>
  51. <scroll-view scroll-x enable-flex class="scroll-view_H" type="list">
  52. <view class="goods-item" v-for="item in 6" :key="item">
  53. <image class="img" style="" src="http://t13.baidu.com/it/u=2921758692,2069247658&fm=224&app=112&f=JPEG?w=500&h=500" />
  54. <view style="margin-left: 20rpx">
  55. <view>故事</view>
  56. <view class="gs_js">精彩瞬间</view>
  57. </view>
  58. </view>
  59. </scroll-view>
  60. <!-- 底部logo -->
  61. <view class="btm_box">
  62. <view class="">
  63. <image src="/static/img/wx.png" class="btn_img" />
  64. <image src="/static/img/wx1.png" class="btn_img" />
  65. <image src="/static/img/wx2.png" class="btn_img" />
  66. </view>
  67. <view class="">
  68. @ 2025 厦门文物管家 保留所有权利
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. let that;
  76. export default {
  77. onLoad(option) {
  78. that = this;
  79. },
  80. data() {
  81. return {
  82. bannerlist: ['https://img2.baidu.com/it/u=443975182,626431415&fm=253&fmt=auto&app=120&f=JPEG?w=627&h=418']
  83. };
  84. },
  85. /* 页面触底 */
  86. onReachBottom() {
  87. console.log('触底了');
  88. },
  89. methods: {
  90. // 报名
  91. goSignup() {
  92. uni.navigateTo({
  93. url: '/index_fenbao/XuanJiangYuan/bm_page'
  94. });
  95. },
  96. // 更多讲员
  97. gdxjyBtn() {
  98. uni.navigateTo({
  99. url: '/index_fenbao/XuanJiangYuan/XuanJiangYuan'
  100. });
  101. },
  102. xqBtn() {
  103. uni.navigateTo({
  104. url: '/index_fenbao/XuanJiangYuan/xjy_XiangQing'
  105. });
  106. }
  107. }
  108. };
  109. </script>
  110. <style>
  111. /deep/.u-swiper-indicator__wrapper__dot--active {
  112. width: 5px !important;
  113. }
  114. .box {
  115. height: auto;
  116. width: 100%;
  117. padding-bottom: 50rpx;
  118. background-image: url('https://huli-app.wenlvti.net/app_static/minnanhun/image/gj_bg.png');
  119. background-repeat: repeat-y;
  120. background-size: 100%;
  121. }
  122. .ban {
  123. position: relative;
  124. width: 92%;
  125. margin: auto;
  126. }
  127. .bm_box {
  128. position: absolute;
  129. display: flex;
  130. width: 100%;
  131. top: 200rpx;
  132. justify-content: space-around;
  133. }
  134. .bm_js {
  135. font-size: 30rpx;
  136. color: #ffe1b8;
  137. }
  138. .bm_js2 {
  139. font-size: 26rpx;
  140. color: #ffe1b8;
  141. }
  142. .goto {
  143. width: 150rpx;
  144. height: 70rpx;
  145. line-height: 70rpx;
  146. color: #ffffff;
  147. text-align: center;
  148. border-radius: 10rpx;
  149. background-color: #fb5903;
  150. }
  151. .ld {
  152. font-size: 30rpx;
  153. font-weight: 700;
  154. margin-bottom: 20rpx;
  155. }
  156. .list_box {
  157. display: flex;
  158. flex-wrap: wrap;
  159. justify-content: space-between;
  160. margin-bottom: 30rpx;
  161. }
  162. .list_item {
  163. width: 330rpx;
  164. height: 270rpx;
  165. margin-bottom: 30rpx;
  166. border-radius: 10rpx;
  167. background-color: #ffe1b8;
  168. }
  169. .item_tit {
  170. margin-top: 8rpx;
  171. margin-left: 20rpx;
  172. }
  173. .jj_box {
  174. margin-top: 20rpx;
  175. font-size: 28rpx;
  176. height: 230rpx;
  177. overflow: scroll;
  178. }
  179. .item_name {
  180. text-align: center;
  181. margin-top: 8rpx;
  182. }
  183. .xjy {
  184. display: flex;
  185. margin-bottom: 20rpx;
  186. justify-content: space-between;
  187. }
  188. .xjy .gd {
  189. width: 110rpx;
  190. height: 60rpx;
  191. line-height: 60rpx;
  192. margin-top: -2rpx;
  193. text-align: center;
  194. border-radius: 30rpx;
  195. color: #ffffff;
  196. background-color: #f47a1a;
  197. }
  198. .good-hot {
  199. padding: 16rpx;
  200. }
  201. .scroll-view_H {
  202. width: 100%;
  203. white-space: nowrap;
  204. height: 480rpx;
  205. flex-direction: row;
  206. }
  207. ..scroll-view_H {
  208. white-space: nowrap; /* 确保子元素在同一行显示 */
  209. width: 100%; /* 设置 scroll-view 的宽度 */
  210. }
  211. .scroll-view_H .goods-item {
  212. display: inline-block; /* 使用 inline-block 确保子元素在同一行显示 */
  213. width: 450rpx;
  214. height: 400rpx;
  215. border-radius: 10rpx;
  216. flex-direction: column;
  217. background-color: #ffe1b8;
  218. margin-right: 20rpx; /* 添加右边距,最后一个子元素的右边距为 0 */
  219. }
  220. .scroll-view_H .goods-item:last-child {
  221. margin-right: 0;
  222. }
  223. .goods-item .img {
  224. width: 100%;
  225. height: 300rpx;
  226. border-radius: 10rpx;
  227. }
  228. .gs_js {
  229. font-size: 28rpx;
  230. color: #aba89a;
  231. margin-top: 10rpx;
  232. }
  233. .btm_box{
  234. text-align: center;
  235. font-size: 26rpx;
  236. }
  237. .btn_img{
  238. width: 40rpx;
  239. height: 40rpx;
  240. }
  241. </style>