home.wxml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <view class="h-screen flex flex-col paper-pattern">
  2. <page-header />
  3. <scroll-view class="flex-1 min-h-0" scroll-y>
  4. <view class="tabbar-safe-bottom">
  5. <view class="px-4 pt-4">
  6. <banner-swiper list="{{banners}}" bind:select="onBannerTap" />
  7. </view>
  8. <view class="mx-4 mt-4 rounded-2xl bg-white/85 border border-[#eadcc5] px-2 py-3 shadow-sm">
  9. <view class="grid grid-cols-4 gap-x-1 gap-y-3 px-1">
  10. <view
  11. wx:for="{{quickEntries}}"
  12. wx:key="text"
  13. class="flex w-full flex-col items-center gap-1.5"
  14. data-index="{{index}}"
  15. bindtap="onQuickTap"
  16. >
  17. <view
  18. class="w-11 h-11 rounded-2xl flex items-center justify-center border"
  19. style="background-color: {{item.iconBg}}; border-color: {{item.iconBorder}};"
  20. >
  21. <svg-icon name="{{item.icon}}" size="23px" color="{{item.iconColor}}" />
  22. </view>
  23. <text class="text-[10px] font-medium text-[#4d4540]">{{item.text}}</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="mt-5">
  28. <view class="px-4">
  29. <section-header title="精选推荐" barColor="#b48732" moreText="更多" bind:more="onMoreRecommend" />
  30. </view>
  31. <scroll-view class="mt-3" scroll-x>
  32. <view class="inline-flex gap-3 pl-4 pr-4">
  33. <recommend-card wx:for="{{recommends}}" wx:key="title" item="{{item}}" />
  34. </view>
  35. </scroll-view>
  36. </view>
  37. <view class="mt-5 px-4">
  38. <section-header title="最新资讯" barColor="#a83f2d" moreText="查看全部" bind:more="onMoreNews" />
  39. <view class="mt-3 overflow-hidden rounded-2xl border border-[#eadcc5] bg-white/90 divide-y divide-[#f0e6d5]">
  40. <news-item wx:for="{{news}}" wx:key="title" item="{{item}}" />
  41. </view>
  42. </view>
  43. <view class="mt-5 px-4">
  44. <section-header title="志愿者组织" barColor="#b48732" moreText="查看全部" bind:more="onMoreVolunteer" />
  45. <view class="flex flex-col mt-3 gap-2.5">
  46. <volunteer-card wx:for="{{volunteers}}" wx:key="title" item="{{item}}" />
  47. </view>
  48. </view>
  49. <view class="tabbar-placeholder"></view>
  50. </view>
  51. </scroll-view>
  52. <van-toast id="van-toast" />
  53. </view>