detail.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!-- pages/detail/detail.wxml -->
  2. <view class="detail-container">
  3. <!-- 景点图片轮播 - 增加阴影和圆角 -->
  4. <swiper class="spot-swiper" indicator-dots="{{true}}" autoplay="{{false}}" interval="5000" indicator-color="rgba(255,255,255,0.5)" indicator-active-color="#e54d42">
  5. <swiper-item>
  6. <image src="{{spot.image_url}}" mode="aspectFill" class="swiper-image"/>
  7. </swiper-item>
  8. </swiper>
  9. <!-- 景点基本信息卡片 - 增加卡片阴影和红色主题 -->
  10. <view class="spot-info-card">
  11. <view class="spot-header">
  12. <text class="spot-name">{{spot.name}}</text>
  13. <text class="spot-category red-badge">{{spot.category | formatCategory}}</text>
  14. </view>
  15. <view class="spot-meta">
  16. <view class="meta-item">
  17. <icon type="location" size="16" color="#e54d42"></icon>
  18. <text class="meta-text">{{spot.location}}</text>
  19. </view>
  20. <view class="meta-item">
  21. <icon type="time" size="16" color="#e54d42"></icon>
  22. <text class="meta-text">开放时间: {{spot.open_time || '全天'}}</text>
  23. </view>
  24. <view class="meta-item">
  25. <icon type="money" size="16" color="#e54d42"></icon>
  26. <text class="meta-text">门票: {{spot.ticket_info || '免费'}}</text>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 景点介绍 - 卡片式设计 -->
  31. <view class="info-card">
  32. <view class="section-title">
  33. <text>景点介绍</text>
  34. </view>
  35. <view class="section-content">{{spot.description || '暂无详细介绍'}}</view>
  36. </view>
  37. <!-- 红色历史 - 突出显示 -->
  38. <view class="info-card red-history" wx:if="{{spot.history}}">
  39. <view class="section-title">
  40. <text>红色历史</text>
  41. </view>
  42. <view class="section-content">{{spot.history}}</view>
  43. </view>
  44. </view>
  45. <!-- 底部操作栏 - 固定定位 -->
  46. <view class="action-bar">
  47. <!-- 修改底部操作栏部分 -->
  48. <view class="action-bar">
  49. <button class="action-btn" bindtap="addToPlan" hover-class="button-hover">
  50. <text>加入行程</text>
  51. </button>
  52. </view>
  53. </view>