index.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. <!-- 中间横幅图片 @Author: Antigravity -->
  47. <view class="middle-section">
  48. <image src="/static/images/index-middle.png" class="middle-image" mode="widthFix"></image>
  49. </view>
  50. <!-- 底部居中标志 @Author: Antigravity -->
  51. <view class="symbol-section">
  52. <image src="/static/images/index-symbol.png" class="symbol-img" mode="widthFix"></image>
  53. </view>
  54. <!-- 底部手势与文字 @Author: Antigravity -->
  55. <view class="hand-section">
  56. <view class="hand-wrapper">
  57. <image src="/static/images/index-hand.png" class="hand-img" mode="widthFix"></image>
  58. <view class="hand-text-content">
  59. <text class="hand-title">好萌友提醒您~</text>
  60. <text class="hand-subtitle">功能优化中,敬请期待~</text>
  61. </view>
  62. </view>
  63. </view>
  64. <custom-tabbar></custom-tabbar>
  65. </view>
  66. </template>
  67. <script setup>
  68. import customTabbar from '@/components/custom-tabbar/index.vue'
  69. /** 首页脚本 @Author: Antigravity */
  70. </script>
  71. <style lang="scss" scoped>
  72. .home-page {
  73. background: #f8f9fb;
  74. min-height: 100vh;
  75. padding-bottom: 120rpx;
  76. }
  77. /* ====== 顶部搜索与背景 ====== */
  78. .header-section {
  79. position: relative;
  80. width: 100%;
  81. }
  82. .header-bg {
  83. width: 100%;
  84. display: block;
  85. }
  86. /* ====== 通知栏 ====== */
  87. .notice-section {
  88. padding: 20rpx 32rpx;
  89. }
  90. .notice-bar {
  91. display: flex;
  92. align-items: center;
  93. background: #fffbef;
  94. border-radius: 20rpx;
  95. padding: 16rpx 24rpx;
  96. gap: 16rpx;
  97. }
  98. .notice-icon {
  99. width: 40rpx;
  100. height: 40rpx;
  101. flex-shrink: 0;
  102. }
  103. .notice-text {
  104. font-size: 24rpx;
  105. color: #e6a23c;
  106. line-height: 1.4;
  107. }
  108. /* ====== 核心卡片布局 @Author: Antigravity ====== */
  109. .main-nav-section {
  110. padding: 10rpx 32rpx;
  111. }
  112. .nav-container {
  113. display: flex;
  114. height: 280rpx; /* 将之前较高的 380rpx 调低,使整体按钮高度变矮 */
  115. gap: 20rpx;
  116. }
  117. .nav-card {
  118. border-radius: 24rpx;
  119. position: relative;
  120. overflow: hidden;
  121. background: #fff;
  122. }
  123. .card-bg {
  124. position: absolute;
  125. top: 0;
  126. left: 0;
  127. width: 100%;
  128. height: 100%;
  129. z-index: 1;
  130. }
  131. .card-info {
  132. position: relative;
  133. z-index: 2;
  134. padding: 30rpx 24rpx;
  135. }
  136. .large-card {
  137. flex: 1;
  138. }
  139. .right-stack {
  140. flex: 1;
  141. display: flex;
  142. flex-direction: column;
  143. gap: 20rpx;
  144. }
  145. .small-card {
  146. flex: 1;
  147. }
  148. .card-title {
  149. font-size: 32rpx;
  150. font-weight: 800;
  151. color: #333;
  152. margin-bottom: 4rpx;
  153. display: block;
  154. }
  155. /* 根据图片色系微调文字颜色以匹配 UI 稿 */
  156. .large-card .card-title { color: #d35400; }
  157. .right-stack .small-card:first-child .card-title { color: #2c5ba7; }
  158. .right-stack .small-card:last-child .card-title { color: #c0392b; }
  159. .card-desc {
  160. font-size: 20rpx;
  161. color: #8e8e8e;
  162. display: block;
  163. }
  164. /* ====== 中间横幅 @Author: Antigravity ====== */
  165. .middle-section {
  166. padding: 10rpx 0; /* 缩小自身上下间距 */
  167. display: flex;
  168. justify-content: center;
  169. }
  170. .middle-image {
  171. width: 65%; /* 进一步缩小宽度到 65% */
  172. border-radius: 20rpx;
  173. display: block;
  174. }
  175. /* ====== 底部标志 @Author: Antigravity ====== */
  176. .symbol-section {
  177. display: flex;
  178. justify-content: center;
  179. align-items: center;
  180. padding: 10rpx 32rpx 20rpx; /* 控制绿色横幅的 padding 以对齐上方 */
  181. }
  182. .symbol-img {
  183. width: 100%; /* 中间的标志(绿色大横幅)完美等宽于三个按钮 */
  184. border-radius: 20rpx;
  185. display: block;
  186. }
  187. /* ====== 底部手势与文字 @Author: Antigravity ====== */
  188. .hand-section {
  189. padding: 30rpx 32rpx 60rpx;
  190. display: flex;
  191. justify-content: center;
  192. }
  193. .hand-wrapper {
  194. position: relative;
  195. width: 100%;
  196. display: flex;
  197. justify-content: center;
  198. align-items: center;
  199. }
  200. .hand-img {
  201. width: 100%;
  202. display: block;
  203. }
  204. .hand-text-content {
  205. position: absolute;
  206. top: 50%;
  207. left: 50%;
  208. transform: translate(-50%, -50%);
  209. display: flex;
  210. flex-direction: column;
  211. align-items: center;
  212. gap: 12rpx;
  213. }
  214. .hand-title {
  215. font-size: 28rpx;
  216. color: #333;
  217. font-weight: bold;
  218. }
  219. .hand-subtitle {
  220. font-size: 24rpx;
  221. color: #999;
  222. }
  223. </style>