index.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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 @click="$common.navigateTo('/index_fenbao/XuanJiangYuan/xq_page?id=' + item.id)" class="list_item" v-for="item in activityList" :key="item">
  25. <img
  26. style="width: 100%; height: 200rpx; border-radius: 10rpx"
  27. :src="item.image"
  28. />
  29. <view class="item_tit">{{item.title}}</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. onShow(option) {
  81. that.getActivityList();
  82. that.themeDetails();
  83. },
  84. data() {
  85. return {
  86. bannerlist: [],
  87. activityList: []
  88. };
  89. },
  90. /* 页面触底 */
  91. onReachBottom() {
  92. console.log('触底了');
  93. },
  94. methods: {
  95. themeDetails() {
  96. this.$api.activityThemeDetails(
  97. {
  98. id: 3
  99. },
  100. data => {
  101. if (data.code == 0) {
  102. that.$common.errorToShow(data.msg);
  103. return;
  104. } else {
  105. that.bannerlist = data.data.images;
  106. // console.log(that.bannerlist);
  107. }
  108. }
  109. );
  110. },
  111. getActivityList() {
  112. this.$api.activityLists(
  113. {
  114. type: 3
  115. },
  116. data => {
  117. if (data.code == 0) {
  118. that.$common.errorToShow(data.msg);
  119. return;
  120. } else {
  121. that.activityList = data.data;
  122. // console.log(that.activityList);
  123. }
  124. }
  125. );
  126. },
  127. // 详情
  128. goSignup() {
  129. uni.navigateTo({
  130. url: '/index_fenbao/XuanJiangYuan/xq_page'
  131. });
  132. },
  133. // 更多讲员
  134. gdxjyBtn() {
  135. uni.navigateTo({
  136. url: '/index_fenbao/XuanJiangYuan/XuanJiangYuan'
  137. });
  138. },
  139. xqBtn() {
  140. uni.navigateTo({
  141. url: '/index_fenbao/XuanJiangYuan/xjy_XiangQing'
  142. });
  143. }
  144. }
  145. };
  146. </script>
  147. <style>
  148. /deep/.u-swiper-indicator__wrapper__dot--active {
  149. width: 5px !important;
  150. }
  151. .box {
  152. height: auto;
  153. width: 100%;
  154. padding-bottom: 50rpx;
  155. background-image: url('https://huli-app.wenlvti.net/app_static/minnanhun/image/gj_bg.png');
  156. background-repeat: repeat-y;
  157. background-size: 100%;
  158. }
  159. .ban {
  160. position: relative;
  161. width: 92%;
  162. margin: auto;
  163. }
  164. .bm_box {
  165. position: absolute;
  166. display: flex;
  167. width: 100%;
  168. top: 200rpx;
  169. justify-content: space-around;
  170. }
  171. .bm_js {
  172. font-size: 30rpx;
  173. color: #ffe1b8;
  174. }
  175. .bm_js2 {
  176. font-size: 26rpx;
  177. color: #ffe1b8;
  178. }
  179. .goto {
  180. width: 150rpx;
  181. height: 70rpx;
  182. line-height: 70rpx;
  183. color: #ffffff;
  184. text-align: center;
  185. border-radius: 10rpx;
  186. background-color: #fb5903;
  187. }
  188. .ld {
  189. font-size: 30rpx;
  190. font-weight: 700;
  191. margin-bottom: 20rpx;
  192. }
  193. .list_box {
  194. display: flex;
  195. flex-wrap: wrap;
  196. justify-content: space-between;
  197. margin-bottom: 30rpx;
  198. }
  199. .list_item {
  200. width: 330rpx;
  201. height: 270rpx;
  202. margin-bottom: 30rpx;
  203. border-radius: 10rpx;
  204. background-color: #ffe1b8;
  205. }
  206. .item_tit {
  207. margin-top: 8rpx;
  208. margin-left: 20rpx;
  209. }
  210. .jj_box {
  211. margin-top: 20rpx;
  212. font-size: 28rpx;
  213. height: 230rpx;
  214. overflow: scroll;
  215. }
  216. .item_name {
  217. text-align: center;
  218. margin-top: 8rpx;
  219. }
  220. .xjy {
  221. display: flex;
  222. margin-bottom: 20rpx;
  223. justify-content: space-between;
  224. }
  225. .xjy .gd {
  226. width: 110rpx;
  227. height: 60rpx;
  228. line-height: 60rpx;
  229. margin-top: -2rpx;
  230. text-align: center;
  231. border-radius: 30rpx;
  232. color: #ffffff;
  233. background-color: #f47a1a;
  234. }
  235. .good-hot {
  236. padding: 16rpx;
  237. }
  238. .scroll-view_H {
  239. width: 100%;
  240. white-space: nowrap;
  241. height: 480rpx;
  242. flex-direction: row;
  243. }
  244. ..scroll-view_H {
  245. white-space: nowrap; /* 确保子元素在同一行显示 */
  246. width: 100%; /* 设置 scroll-view 的宽度 */
  247. }
  248. .scroll-view_H .goods-item {
  249. display: inline-block; /* 使用 inline-block 确保子元素在同一行显示 */
  250. width: 450rpx;
  251. height: 400rpx;
  252. border-radius: 10rpx;
  253. flex-direction: column;
  254. background-color: #ffe1b8;
  255. margin-right: 20rpx; /* 添加右边距,最后一个子元素的右边距为 0 */
  256. }
  257. .scroll-view_H .goods-item:last-child {
  258. margin-right: 0;
  259. }
  260. .goods-item .img {
  261. width: 100%;
  262. height: 300rpx;
  263. border-radius: 10rpx;
  264. }
  265. .gs_js {
  266. font-size: 28rpx;
  267. color: #aba89a;
  268. margin-top: 10rpx;
  269. }
  270. .btm_box{
  271. text-align: center;
  272. font-size: 26rpx;
  273. }
  274. .btn_img{
  275. width: 40rpx;
  276. height: 40rpx;
  277. }
  278. </style>