index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view class="home-page">
  3. <!-- 顶部背景与搜索区域 @Author: Antigravity -->
  4. <view class="header-section">
  5. <image src="/static/images/index-header.png" class="header-bg" mode="widthFix"></image>
  6. </view>
  7. <!-- 系统通知栏 @Author: Antigravity -->
  8. <view class="notice-section">
  9. <view class="notice-bar">
  10. <image src="/static/images/index-notice.png" class="notice-icon" mode="aspectFit"></image>
  11. <text class="notice-text">【重要通知】尊敬的用户,由于近期接送需求激增,请各位宠主尽量提前24小时进行服务预约,感谢您的理解与配合!</text>
  12. </view>
  13. </view>
  14. <!-- 业务导航区 (左1右2) @Author: Antigravity -->
  15. <view class="main-nav-section">
  16. <view class="nav-container">
  17. <!-- 左侧大按钮: 宠物接送 -->
  18. <view class="nav-card large-card">
  19. <image src="/static/images/pickup-dropoff.png" class="card-bg" mode="aspectFill"></image>
  20. <view class="card-info">
  21. <text class="card-title">宠物接送</text>
  22. <text class="card-desc">支持单操/往返服务</text>
  23. </view>
  24. </view>
  25. <!-- 右侧分栏 -->
  26. <view class="right-stack">
  27. <!-- 右上: 上门喂遛 -->
  28. <view class="nav-card small-card">
  29. <image src="/static/images/feed-walk.png" class="card-bg" mode="aspectFill"></image>
  30. <view class="card-info">
  31. <text class="card-title">上门喂遛</text>
  32. <text class="card-desc">每次上门基础费用</text>
  33. </view>
  34. </view>
  35. <!-- 右下: 上门洗护 -->
  36. <view class="nav-card small-card">
  37. <image src="/static/images/laundry-clean.png" class="card-bg" mode="aspectFill"></image>
  38. <view class="card-info">
  39. <text class="card-title">上门洗护</text>
  40. <text class="card-desc">每次上门基础费用</text>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <custom-tabbar></custom-tabbar>
  47. </view>
  48. </template>
  49. <script setup>
  50. import customTabbar from '@/components/custom-tabbar/index.vue'
  51. /** 首页脚本 @Author: Antigravity */
  52. </script>
  53. <style lang="scss" scoped>
  54. .home-page {
  55. background: #f8f9fb;
  56. min-height: 100vh;
  57. padding-bottom: 120rpx;
  58. }
  59. /* ====== 顶部搜索与背景 ====== */
  60. .header-section {
  61. position: relative;
  62. width: 100%;
  63. }
  64. .header-bg {
  65. width: 100%;
  66. display: block;
  67. }
  68. /* ====== 通知栏 ====== */
  69. .notice-section {
  70. padding: 20rpx 32rpx;
  71. }
  72. .notice-bar {
  73. display: flex;
  74. align-items: center;
  75. background: #fffbef;
  76. border-radius: 20rpx;
  77. padding: 16rpx 24rpx;
  78. gap: 16rpx;
  79. }
  80. .notice-icon {
  81. width: 40rpx;
  82. height: 40rpx;
  83. flex-shrink: 0;
  84. }
  85. .notice-text {
  86. font-size: 24rpx;
  87. color: #e6a23c;
  88. line-height: 1.4;
  89. }
  90. /* ====== 核心卡片布局 @Author: Antigravity ====== */
  91. .main-nav-section {
  92. padding: 10rpx 32rpx;
  93. }
  94. .nav-container {
  95. display: flex;
  96. height: 380rpx;
  97. gap: 20rpx;
  98. }
  99. .nav-card {
  100. border-radius: 24rpx;
  101. position: relative;
  102. overflow: hidden;
  103. background: #fff;
  104. }
  105. .card-bg {
  106. position: absolute;
  107. top: 0;
  108. left: 0;
  109. width: 100%;
  110. height: 100%;
  111. z-index: 1;
  112. }
  113. .card-info {
  114. position: relative;
  115. z-index: 2;
  116. padding: 30rpx 24rpx;
  117. }
  118. .large-card {
  119. flex: 1;
  120. }
  121. .right-stack {
  122. flex: 1;
  123. display: flex;
  124. flex-direction: column;
  125. gap: 20rpx;
  126. }
  127. .small-card {
  128. flex: 1;
  129. }
  130. .card-title {
  131. font-size: 32rpx;
  132. font-weight: 800;
  133. color: #333;
  134. margin-bottom: 4rpx;
  135. display: block;
  136. }
  137. /* 根据图片色系微调文字颜色以匹配 UI 稿 */
  138. .large-card .card-title { color: #d35400; }
  139. .right-stack .small-card:first-child .card-title { color: #2c5ba7; }
  140. .right-stack .small-card:last-child .card-title { color: #c0392b; }
  141. .card-desc {
  142. font-size: 20rpx;
  143. color: #8e8e8e;
  144. display: block;
  145. }
  146. </style>