Header.vue 9.6 KB

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