index.wxml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!--pages/index/index.wxml-->
  2. <!-- 小程序首页 -->
  3. <view hidden="{{!showLoading}}">
  4. <loading bind:startexplore="onStartExplore"></loading>
  5. </view>
  6. <view hidden="{{showLoading}}" class="home-container {{!isFromParam ? 'home-tabar' : ''}} {{isFirstOpen ? 'home-not-overflow' : ''}}">
  7. <!-- 轮播图区域 -->
  8. <view class="carousel-section" wx:if="{{bannerData.length}}">
  9. <swiper class="carousel-swiper" indicator-dots="{{true}}" autoplay="{{true}}" interval="4000" duration="500">
  10. <swiper-item wx:for="{{bannerData}}" wx:key="carouselId" bindtap="onBannerClick" data-url="{{item.url}}">
  11. <image src="{{item.img}}" alt="{{item.title || '轮播图'}}" class="carousel-img" mode="aspectFill"></image>
  12. </swiper-item>
  13. </swiper>
  14. </view>
  15. <view class="carousel-section" wx:else>
  16. <view class="nobanner-data">
  17. 轮播图暂无数据
  18. </view>
  19. </view>
  20. <!-- 功能区域 -->
  21. <view class="function-section">
  22. <view class="function-item {{!isLoggedIn ? 'function-item-disabled' : ''}}" bindtap="handleFunctionClick" data-type="visit">
  23. <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/visit.png" alt="预约参观" class="function-icon {{!isLoggedIn ? 'function-icon-disabled' : ''}}"></image>
  24. <text class="function-text {{!isLoggedIn ? 'function-text-disabled' : ''}}">预约参观</text>
  25. </view>
  26. <view class="function-item {{!isLoggedIn ? 'function-item-disabled' : ''}}" bindtap="handleFunctionClick" data-type="activity">
  27. <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/activity.png" alt="活动预约" class="function-icon {{!isLoggedIn ? 'function-icon-disabled' : ''}}"></image>
  28. <text class="function-text {{!isLoggedIn ? 'function-text-disabled' : ''}}">活动预约</text>
  29. </view>
  30. <view class="function-item" bindtap="handleFunctionClick" data-type="map">
  31. <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/map.png" alt="展馆地图" class="function-icon"></image>
  32. <text class="function-text">展馆地图</text>
  33. </view>
  34. <view class="function-item" bindtap="handleFunctionClick" data-type="introduce">
  35. <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/introduce.png" alt="展馆介绍" class="function-icon"></image>
  36. <text class="function-text">展馆介绍</text>
  37. </view>
  38. </view>
  39. <!-- 展览资讯 -->
  40. <view class="section">
  41. <view class="section-header">
  42. <text class="section-title">展馆资讯</text>
  43. <text class="view-more" bindtap="viewMore" data-section="recommended">查看更多 +</text>
  44. </view>
  45. <view wx:if="{{newsList && newsList.length > 0}}">
  46. <view class="news-item" wx:for="{{newsList}}" wx:key="informationId" bindtap="viewNews" data-item="{{item}}">
  47. <image src="{{item.indexImg}}" alt="展览资讯" class="news-img" mode="aspectFill"></image>
  48. <view class="news-content">
  49. <text class="news-title">{{item.title}}</text>
  50. <text class="news-desc">⇀</text>
  51. </view>
  52. </view>
  53. </view>
  54. <view wx:else class="empty-data">
  55. <text class="empty-text">暂无数据</text>
  56. </view>
  57. </view>
  58. <!-- 推荐展览 -->
  59. <view class="section">
  60. <view class="section-header">
  61. <text class="section-title">推荐展览</text>
  62. <text class="view-more" bindtap="viewMore" data-section="exhibition">查看更多 +</text>
  63. </view>
  64. <view wx:if="{{exhibitionList && exhibitionList.length > 0}}">
  65. <scroll-view class="scroll-container" scroll-x="{{true}}">
  66. <view class="scroll-wrapper">
  67. <view class="exhibition-item" wx:for="{{exhibitionList}}" wx:key="exhibitId" bindtap="viewExhibition" data-item="{{item}}">
  68. <image src="{{item.img}}" alt="展览" class="exhibition-img" mode="aspectFill"></image>
  69. <view class="exhibition-info">
  70. <text class="exhibition-title">{{item.title}}</text>
  71. </view>
  72. </view>
  73. </view>
  74. </scroll-view>
  75. </view>
  76. <view wx:else class="empty-data">
  77. <text class="empty-text">暂无数据</text>
  78. </view>
  79. </view>
  80. <!-- 社教活动 -->
  81. <view class="section">
  82. <view class="section-header">
  83. <text class="section-title">社教活动</text>
  84. <text class="view-more" bindtap="viewMore" data-section="activity">查看更多 +</text>
  85. </view>
  86. <view wx:if="{{activeList && activeList.length > 0}}">
  87. <scroll-view class="scroll-container" scroll-x="{{true}}">
  88. <view class="scroll-wrapper">
  89. <view class="activity-item" wx:for="{{activeList}}" wx:key="activityId" bindtap="viewActivity" data-item="{{item}}">
  90. <view class="active-top">
  91. <image src="{{item.indexImg}}" alt="活动" class="activity-img" mode="aspectFill"></image>
  92. <text class="active-go">></text>
  93. </view>
  94. <view class="activity-info">
  95. <text class="activity-title">{{item.title}}</text>
  96. </view>
  97. </view>
  98. </view>
  99. </scroll-view>
  100. </view>
  101. <view wx:else class="empty-data">
  102. <text class="empty-text">暂无数据</text>
  103. </view>
  104. </view>
  105. </view>