Header.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <!--
  2. * @Author: LiZhiWei
  3. * @Date: 2026-01-13 15:41:49
  4. * @LastEditors: LiZhiWei
  5. * @LastEditTime: 2026-01-15 14:49:14
  6. * @Description:
  7. -->
  8. <!--
  9. * @Author: LiZhiWei
  10. * @Description: AppHeader
  11. -->
  12. <template>
  13. <header class="landing-header" :class="{ 'is-scrolled': y > 0 }">
  14. <div class="landing-container h-60px sm:h-80px flex items-center justify-between gap-16px">
  15. <i class="i-custom-logo w-100px h-20px sm:w-128px sm:h-26px"></i>
  16. <!-- Mobile Menu Button -->
  17. <button class="sm:hidden p-8px text-gray-600" @click="isMobileMenuOpen = !isMobileMenuOpen">
  18. <div class="i-carbon-menu text-24px"></div>
  19. </button>
  20. <nav
  21. class="hidden sm:flex items-center gap-20px xl:gap-52px text-16px xl:text-16px text-#334155 h-full"
  22. >
  23. <NuxtLink to="/" class="nav-link flex items-center">首页</NuxtLink>
  24. <NuxtLink to="/" class="nav-link flex items-center">产品中心</NuxtLink>
  25. <div class="group h-full flex items-center">
  26. <NuxtLink to="/" class="nav-link flex items-center">解决方案</NuxtLink>
  27. <!-- Mega Menu -->
  28. <div
  29. class="fixed left-0 top-60px sm:top-80px w-full bg-white shadow-lg border-t border-gray-100 hidden group-hover:block z-50 animate-fade-in-down"
  30. >
  31. <div class="landing-container py-40px flex">
  32. <!-- Left Sidebar -->
  33. <div class="w-240px border-r border-gray-100 pr-40px shrink-0">
  34. <div class="text-18px font-600 mb-20px text-#1e293b">解决方案分类</div>
  35. <div class="flex flex-col gap-4px">
  36. <div
  37. v-for="(cat, index) in solutionCategories"
  38. :key="index"
  39. class="px-16px py-12px rounded-4px cursor-pointer text-14px transition-colors"
  40. :class="
  41. activeCategory === index
  42. ? 'bg-#ECEFF6 text-#0F67F8 font-500'
  43. : 'text-#091221/70'
  44. "
  45. @mouseenter="activeCategory = index"
  46. >
  47. {{ cat.name }}
  48. </div>
  49. </div>
  50. </div>
  51. <!-- Right Content -->
  52. <div class="flex-1 pl-60px">
  53. <div class="grid grid-cols-2 gap-x-60px gap-y-40px">
  54. <div
  55. v-for="(item, idx) in currentItems"
  56. :key="idx"
  57. class="flex gap-16px group/item cursor-pointer"
  58. >
  59. <!-- Icon -->
  60. <i :class="[item.icon, 'wh-48px']"></i>
  61. <!-- Text -->
  62. <div>
  63. <div
  64. class="text-16px font-600 text-#1e293b mb-8px group-hover/item:text-#2563eb transition-colors"
  65. >
  66. {{ item.title }}
  67. </div>
  68. <div class="text-12px text-#64748b lh-20px line-clamp-2">{{ item.desc }}</div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <NuxtLink to="/" class="nav-link flex items-center">客户案例</NuxtLink>
  77. <NuxtLink to="/" class="nav-link flex items-center">关于绘家</NuxtLink>
  78. <NuxtLink to="/" class="nav-link flex items-center">联系合作</NuxtLink>
  79. </nav>
  80. <div class="flex items-center gap-30px">
  81. <span class="flex items-center gap-14px hidden sm:flex">
  82. <i class="i-custom-telephone wh-28px"></i>
  83. <span class="font-s-28px font-bold text-#28292E d-din-pro-600-semibold">
  84. 400-600-7709
  85. </span>
  86. </span>
  87. <button
  88. class="btn-primary text-white font-medium w-134px h-40px pf-sc-medium font-s-16px rounded-8px hidden sm:block"
  89. @click="openConsultation"
  90. >
  91. <span class="lh-20px">申请试用</span>
  92. </button>
  93. </div>
  94. </div>
  95. <!-- Mobile Menu Overlay -->
  96. <div
  97. v-if="isMobileMenuOpen"
  98. class="fixed inset-0 top-60px bg-white z-90 sm:hidden flex flex-col p-20px animate-fade-in-down"
  99. >
  100. <nav class="flex flex-col gap-20px text-16px text-#334155 font-500">
  101. <NuxtLink to="/" class="py-10px border-b border-gray-100" @click="isMobileMenuOpen = false">
  102. 首页
  103. </NuxtLink>
  104. <NuxtLink to="/" class="py-10px border-b border-gray-100" @click="isMobileMenuOpen = false">
  105. 产品中心
  106. </NuxtLink>
  107. <div class="py-10px border-b border-gray-100">
  108. <div class="mb-10px">解决方案</div>
  109. <div class="pl-16px flex flex-col gap-10px text-14px text-gray-500">
  110. <div v-for="(cat, idx) in solutionCategories" :key="idx">
  111. <div class="font-600 text-gray-700 mb-4px">{{ cat.name }}</div>
  112. <div class="pl-8px flex flex-col gap-6px">
  113. <div v-for="(item, i) in cat.items" :key="i" class="py-2px">
  114. {{ item.title }}
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <NuxtLink to="/" class="py-10px border-b border-gray-100" @click="isMobileMenuOpen = false">
  121. 客户案例
  122. </NuxtLink>
  123. <NuxtLink to="/" class="py-10px border-b border-gray-100" @click="isMobileMenuOpen = false">
  124. 关于绘家
  125. </NuxtLink>
  126. <NuxtLink to="/" class="py-10px border-b border-gray-100" @click="isMobileMenuOpen = false">
  127. 联系合作
  128. </NuxtLink>
  129. </nav>
  130. <div class="mt-auto pt-20px border-t border-gray-100">
  131. <div class="flex items-center gap-10px mb-20px justify-center">
  132. <i class="i-custom-telephone wh-24px"></i>
  133. <span class="font-s-20px font-bold text-#28292E">400-600-7709</span>
  134. </div>
  135. <button
  136. class="btn-primary text-white font-medium w-full h-44px rounded-8px text-16px"
  137. @click="
  138. () => {
  139. openConsultation()
  140. isMobileMenuOpen = false
  141. }
  142. "
  143. >
  144. 申请试用
  145. </button>
  146. </div>
  147. </div>
  148. </header>
  149. </template>
  150. <script setup lang="ts">
  151. const { openConsultation } = useConsultation()
  152. const { y } = useWindowScroll()
  153. const isMobileMenuOpen = ref(false)
  154. const activeCategory = ref(0)
  155. const solutionCategories = [
  156. {
  157. name: '物业管理系统',
  158. items: [
  159. {
  160. title: '智慧收费系统',
  161. desc: '自动生成账单、线上多渠道支付、实时对账、智能催缴,收缴率显著提升,财务效率提高80%',
  162. icon: 'i-custom-sf',
  163. },
  164. {
  165. title: '综合工单调度',
  166. desc: '报修、投诉线上提交、智能派单、全程跟踪、业主评价,形成服务闭环,提升响应速度与满意度',
  167. icon: 'i-custom-gd',
  168. },
  169. {
  170. title: '移动巡检巡更',
  171. desc: '扫码打卡、规范流程、问题实时上报,确保服务质量可追溯,降低管理盲区,提升巡检效率',
  172. icon: 'i-custom-ydxj',
  173. },
  174. {
  175. title: '智慧车场管理',
  176. desc: '无人值守、自动识别、线上缴费,降低人工成本70%,杜绝收费漏洞,提升车场运营效率',
  177. icon: 'i-custom-zhcc',
  178. },
  179. {
  180. title: '数据决策中心',
  181. desc: '多维度经营报表、收缴率分析、业主满意度洞察,数据可视化呈现,助力科学决策与精细运营',
  182. icon: 'i-custom-sjjc',
  183. },
  184. {
  185. title: '资产与租赁管理',
  186. desc: '房屋、车位、客户档案数字化管理,合同、费用一目了然,提升资产利用率与租赁管理效率',
  187. icon: 'i-custom-zczl',
  188. },
  189. ],
  190. },
  191. {
  192. name: '业主服务平台',
  193. items: [
  194. // Placeholder content for demo purposes
  195. {
  196. title: '业主移动端',
  197. desc: '提供便捷的线上服务入口,提升业主体验',
  198. icon: 'i-carbon-user-role',
  199. iconBg: 'bg-#3b82f6',
  200. },
  201. ],
  202. },
  203. {
  204. name: '智能硬件物联',
  205. items: [
  206. // Placeholder content for demo purposes
  207. {
  208. title: '智能门禁',
  209. desc: '安全便捷的通行体验,支持人脸识别',
  210. icon: 'i-carbon-gateway',
  211. iconBg: 'bg-#3b82f6',
  212. },
  213. ],
  214. },
  215. ]
  216. const currentItems = computed(() => solutionCategories[activeCategory.value]?.items || [])
  217. </script>
  218. <style scoped lang="scss">
  219. .landing-header {
  220. @apply fixed top-0 left-0 z-100 w-full bg-transparent transition-all duration-300 ease;
  221. &:hover,
  222. &.is-scrolled {
  223. @apply bg-white/80 backdrop-blur-12px shadow-[0_4px_20px_rgba(0,0,0,0.05)] border-b border-white/10;
  224. }
  225. }
  226. .nav-link {
  227. @apply relative py-8px text-[var(--hj-text-2)] transition-all duration-200 ease;
  228. &:hover,
  229. .group:hover & {
  230. @apply text-[var(--hj-primary)] font-600;
  231. }
  232. &::after {
  233. @apply content-[''] absolute bottom-0 left-1/2 w-0 h-3px bg-[var(--hj-primary)] transition-all duration-300 ease -translate-x-1/2;
  234. }
  235. &:hover::after,
  236. .group:hover &::after {
  237. @apply w-30px;
  238. }
  239. }
  240. .btn-primary {
  241. @apply bg-gradient-to-r from-[#779EFF] to-[#0A50FF] border-none outline-none hover:opacity-80;
  242. }
  243. @keyframes fadeInDown {
  244. from {
  245. opacity: 0;
  246. transform: translateY(-10px);
  247. }
  248. to {
  249. opacity: 1;
  250. transform: translateY(0);
  251. }
  252. }
  253. .animate-fade-in-down {
  254. animation: fadeInDown 0.2s ease-out forwards;
  255. &::before {
  256. content: '';
  257. @apply absolute -top-10px left-0 w-full h-10px;
  258. }
  259. }
  260. </style>