Header.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <!--
  2. * @Author: LiZhiWei
  3. * @Date: 2026-01-13 15:41:49
  4. * @LastEditors: LiZhiWei
  5. * @LastEditTime: 2026-01-21 15:22:17
  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-80px flex items-center justify-between gap-16px lt-sm:h-128px lt-sm:px-24px"
  16. >
  17. <i class="i-custom-logo w-160px h-32px lt-sm:w-213px lt-sm:h-64px"></i>
  18. <nav class="hidden sm:flex items-center gap-52px text-16px text-#334155 h-full">
  19. <NuxtLink to="/" class="nav-link flex items-center">首页</NuxtLink>
  20. <div class="group h-full flex items-center">
  21. <NuxtLink to="/" class="nav-link flex items-center">产品中心</NuxtLink>
  22. <div
  23. class="fixed left-0 top-80px w-full hidden bg-white shadow-lg border-t border-gray-100 group-hover:block z-50 animate-fade-in-down"
  24. >
  25. <div class="landing-container py-32px flex justify-start">
  26. <div class="grid grid-cols-2 gap-24px">
  27. <NuxtLink
  28. v-for="(item, idx) in productItems"
  29. :key="idx"
  30. :to="item.link"
  31. target="_blank"
  32. rel="noopener noreferrer"
  33. class="flex gap-16px p-8px w-358px rounded-8px bg-#f6f8fd cursor-pointer group/item transition-all duration-300 border border-transparent hover:border-gray-100 hover:shadow-sm"
  34. >
  35. <i :class="[item.icon, 'wh-106px flex-shrink-0']"></i>
  36. <div class="flex flex-col justify-center py-14px">
  37. <div
  38. class="font-s-16px color-#000000 pf-sc-semibold group-hover/item:text-#0F67F8 transition-colors"
  39. >
  40. {{ item.title }}
  41. </div>
  42. <div class="font-s-16px pf-sc-regular text-#28292e/75 lh-22px mb-12px">
  43. {{ item.desc }}
  44. </div>
  45. <div class="flex items-center text-14px text-#0F67F8">
  46. 查看详情
  47. <i
  48. class="i-custom-arrow-right-c ml-4px wh-18px color-#0F67F8 group-hover/item:translate-x-5px transition-all duration-300"
  49. ></i>
  50. </div>
  51. </div>
  52. </NuxtLink>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="group h-full flex items-center">
  58. <NuxtLink to="/" class="nav-link flex items-center">解决方案</NuxtLink>
  59. <!-- Mega Menu -->
  60. <div
  61. 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"
  62. >
  63. <div class="landing-container py-40px flex">
  64. <!-- Left Sidebar -->
  65. <div class="w-240px border-r border-gray-100 pr-40px shrink-0">
  66. <div class="text-18px font-600 mb-20px text-#1e293b">解决方案分类</div>
  67. <div class="flex flex-col gap-4px">
  68. <div
  69. v-for="(cat, index) in solutionCategories"
  70. :key="index"
  71. class="px-16px py-12px rounded-4px cursor-pointer text-14px transition-colors"
  72. :class="
  73. activeCategory === index
  74. ? 'bg-#ECEFF6 text-#0F67F8 font-500'
  75. : 'text-#091221/70'
  76. "
  77. @mouseenter="activeCategory = index"
  78. >
  79. {{ cat.name }}
  80. </div>
  81. </div>
  82. </div>
  83. <!-- Right Content -->
  84. <div class="flex-1 pl-60px">
  85. <div class="grid grid-cols-2 gap-x-60px gap-y-40px">
  86. <div
  87. v-for="(item, idx) in currentItems"
  88. :key="idx"
  89. class="flex gap-16px group/item cursor-pointer"
  90. >
  91. <!-- Icon -->
  92. <i :class="[item.icon, 'wh-48px']"></i>
  93. <!-- Text -->
  94. <div>
  95. <div
  96. class="text-16px font-600 text-#1e293b mb-8px group-hover/item:text-#2563eb transition-colors"
  97. >
  98. {{ item.title }}
  99. </div>
  100. <div class="text-12px text-#64748b lh-20px line-clamp-2">{{ item.desc }}</div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. <NuxtLink to="/" class="nav-link flex items-center">客户案例</NuxtLink>
  109. <NuxtLink to="/" class="nav-link flex items-center">知产专利</NuxtLink>
  110. <NuxtLink to="/about" class="nav-link flex items-center">关于绘家</NuxtLink>
  111. <!-- <NuxtLink to="/" class="nav-link flex items-center">联系合作</NuxtLink> -->
  112. </nav>
  113. <div class="flex items-center gap-30px lt-sm:hidden">
  114. <i class="i-custom-head-phone h-28px w-199px"></i>
  115. <button
  116. class="btn-primary text-white font-medium w-134px h-40px pf-sc-medium font-s-16px rounded-8px hidden sm:block"
  117. @click="openConsultation"
  118. >
  119. <span class="lh-20px">申请试用</span>
  120. </button>
  121. </div>
  122. <button class="sm:hidden text-#334155" @click="isMobileMenuOpen = !isMobileMenuOpen">
  123. <i v-if="!isMobileMenuOpen" class="i-custom-menu lt-sm:wh-48px"></i>
  124. <i v-else class="i-ep-close lt-sm:wh-48px"></i>
  125. </button>
  126. </div>
  127. </header>
  128. <!-- Mobile Menu Overlay -->
  129. <div
  130. v-if="isMobileMenuOpen"
  131. class="fixed inset-0 top-80px lt-sm:top-128px bg-white z-90 sm:hidden flex flex-col animate-fade-in-down overflow-hidden"
  132. >
  133. <nav class="flex-1 overflow-y-auto py-20px px-24px">
  134. <div class="flex flex-col gap-8px text-16px text-#334155 font-500">
  135. <NuxtLink
  136. to="/"
  137. class="mobile-nav-item flex items-center justify-between group"
  138. @click="isMobileMenuOpen = false"
  139. >
  140. <span>首页</span>
  141. </NuxtLink>
  142. <!-- Product Center Section -->
  143. <div class="border-b border-gray-100">
  144. <div
  145. class="mobile-nav-item flex items-center justify-between !border-none cursor-pointer"
  146. :class="{ 'text-#0F67F8': isMobileProductsOpen }"
  147. @click="toggleMobileSubmenu('products')"
  148. >
  149. <span>产品中心</span>
  150. <i
  151. class="i-ep-arrow-right transition-transform duration-300 text-gray-300"
  152. :class="{
  153. 'rotate-90': isMobileProductsOpen,
  154. 'text-#0F67F8': isMobileProductsOpen,
  155. }"
  156. ></i>
  157. </div>
  158. <div
  159. v-show="isMobileProductsOpen"
  160. class="pl-12px pb-16px flex flex-col gap-12px animate-fade-in"
  161. >
  162. <NuxtLink
  163. v-for="(item, idx) in productItems"
  164. :key="idx"
  165. :to="item.link"
  166. target="_blank"
  167. class="flex items-center gap-12px p-12px rounded-8px bg-gray-50/80 active:bg-blue-50 border border-gray-100 active:border-blue-200 transition-all duration-200"
  168. >
  169. <i :class="[item.icon, 'wh-40px flex-shrink-0']"></i>
  170. <div class="flex flex-col">
  171. <div class="text-15px font-600 text-#1e293b">{{ item.title }}</div>
  172. <div class="text-12px text-#64748b mt-2px">{{ item.desc }}</div>
  173. </div>
  174. </NuxtLink>
  175. </div>
  176. </div>
  177. <!-- Solutions Section -->
  178. <div class="border-b border-gray-100">
  179. <div
  180. class="mobile-nav-item flex items-center justify-between !border-none cursor-pointer"
  181. :class="{ 'text-#0F67F8': isMobileSolutionsOpen }"
  182. @click="toggleMobileSubmenu('solutions')"
  183. >
  184. <span>解决方案</span>
  185. <i
  186. class="i-ep-arrow-right transition-transform duration-300 text-gray-300"
  187. :class="{
  188. 'rotate-90': isMobileSolutionsOpen,
  189. 'text-#0F67F8': isMobileSolutionsOpen,
  190. }"
  191. ></i>
  192. </div>
  193. <div
  194. v-show="isMobileSolutionsOpen"
  195. class="pl-12px pb-16px flex flex-col gap-24px animate-fade-in"
  196. >
  197. <div v-for="(cat, idx) in solutionCategories" :key="idx">
  198. <div
  199. class="font-600 text-15px text-#1e293b mb-12px pl-10px border-l-3 border-#0F67F8 flex items-center h-16px"
  200. >
  201. {{ cat.name }}
  202. </div>
  203. <div class="pl-4px grid grid-cols-2 gap-x-10px gap-y-10px">
  204. <div
  205. v-for="(item, i) in cat.items"
  206. :key="i"
  207. class="text-13px text-#475569 bg-gray-50/80 border border-gray-100 rounded-8px py-12px px-10px flex items-center justify-start text-left active:bg-blue-50 active:border-blue-200 active:text-blue-600 transition-all duration-200 gap-8px"
  208. >
  209. <i :class="[item.icon, 'wh-20px flex-shrink-0']"></i>
  210. {{ item.title }}
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. <NuxtLink
  217. to="/"
  218. class="mobile-nav-item flex items-center justify-between group"
  219. @click="isMobileMenuOpen = false"
  220. >
  221. <span>客户案例</span>
  222. <i class="i-ep-arrow-right text-gray-300 text-12px group-active:text-#0F67F8"></i>
  223. </NuxtLink>
  224. <NuxtLink
  225. to="/about"
  226. class="mobile-nav-item flex items-center justify-between group"
  227. @click="isMobileMenuOpen = false"
  228. >
  229. <span>关于绘家</span>
  230. </NuxtLink>
  231. <!-- <NuxtLink
  232. to="/"
  233. class="mobile-nav-item flex items-center justify-between group"
  234. @click="isMobileMenuOpen = false"
  235. >
  236. <span>联系合作</span>
  237. </NuxtLink> -->
  238. </div>
  239. </nav>
  240. </div>
  241. </template>
  242. <script setup lang="ts">
  243. const { openConsultation } = useConsultation()
  244. const { y } = useWindowScroll()
  245. const isMobileMenuOpen = ref(false)
  246. const isMobileSolutionsOpen = ref(false)
  247. const isMobileProductsOpen = ref(false)
  248. const toggleMobileSubmenu = (menu: 'products' | 'solutions') => {
  249. if (menu === 'products') {
  250. isMobileProductsOpen.value = !isMobileProductsOpen.value
  251. if (isMobileProductsOpen.value) isMobileSolutionsOpen.value = false
  252. } else {
  253. isMobileSolutionsOpen.value = !isMobileSolutionsOpen.value
  254. if (isMobileSolutionsOpen.value) isMobileProductsOpen.value = false
  255. }
  256. }
  257. const activeCategory = ref(0)
  258. const productItems = [
  259. {
  260. title: '绘管家',
  261. desc: '智慧物业综合管理云平台',
  262. icon: 'i-custom-cp-hgj',
  263. link: 'https://www.huiguanjia.cn/',
  264. },
  265. {
  266. title: '绘服务',
  267. desc: '足不出户尽享物业服务',
  268. icon: 'i-custom-cp-hfw',
  269. link: 'https://www.huifuwu.cn/',
  270. },
  271. ]
  272. const solutionCategories = [
  273. {
  274. name: '物业管理系统',
  275. items: [
  276. {
  277. title: '智慧收费系统',
  278. desc: '自动生成账单、线上多渠道支付、实时对账、智能催缴,收缴率显著提升,财务效率提高80%',
  279. icon: 'i-custom-sf',
  280. },
  281. {
  282. title: '综合工单调度',
  283. desc: '报修、投诉线上提交、智能派单、全程跟踪、业主评价,形成服务闭环,提升响应速度与满意度',
  284. icon: 'i-custom-gd',
  285. },
  286. {
  287. title: '移动巡检巡更',
  288. desc: '扫码打卡、规范流程、问题实时上报,确保服务质量可追溯,降低管理盲区,提升巡检效率',
  289. icon: 'i-custom-ydxj',
  290. },
  291. {
  292. title: '智慧车场管理',
  293. desc: '无人值守、自动识别、线上缴费,降低人工成本70%,杜绝收费漏洞,提升车场运营效率',
  294. icon: 'i-custom-zhcc',
  295. },
  296. {
  297. title: '数据决策中心',
  298. desc: '多维度经营报表、收缴率分析、业主满意度洞察,数据可视化呈现,助力科学决策与精细运营',
  299. icon: 'i-custom-sjjc',
  300. },
  301. {
  302. title: '资产与租赁管理',
  303. desc: '房屋、车位、客户档案数字化管理,合同、费用一目了然,提升资产利用率与租赁管理效率',
  304. icon: 'i-custom-zczl',
  305. },
  306. ],
  307. },
  308. {
  309. name: '业主服务平台',
  310. items: [
  311. // Placeholder content for demo purposes
  312. {
  313. title: '业主移动端',
  314. desc: '提供便捷的线上服务入口,提升业主体验',
  315. icon: 'i-carbon-user-role',
  316. iconBg: 'bg-#3b82f6',
  317. },
  318. ],
  319. },
  320. {
  321. name: '智能硬件物联',
  322. items: [
  323. // Placeholder content for demo purposes
  324. {
  325. title: '智能门禁',
  326. desc: '安全便捷的通行体验,支持人脸识别',
  327. icon: 'i-carbon-gateway',
  328. iconBg: 'bg-#3b82f6',
  329. },
  330. ],
  331. },
  332. ]
  333. const currentItems = computed(() => solutionCategories[activeCategory.value]?.items || [])
  334. </script>
  335. <style scoped lang="scss">
  336. .landing-header {
  337. @apply fixed top-0 left-0 z-100 w-full bg-transparent transition-all duration-300 ease;
  338. &:hover,
  339. &.is-scrolled {
  340. @apply bg-white/80 backdrop-blur-12px shadow-[0_4px_20px_rgba(0,0,0,0.05)] border-b border-white/10;
  341. }
  342. @media (max-width: 767px) {
  343. @apply bg-white/80 backdrop-blur-12px shadow-[0_4px_20px_rgba(0,0,0,0.05)] border-b border-white/10;
  344. }
  345. }
  346. .nav-link {
  347. @apply relative py-8px text-[var(--hj-text-2)] transition-all duration-200 ease;
  348. &:hover,
  349. .group:hover & {
  350. @apply text-[var(--hj-primary)] font-600;
  351. }
  352. &::after {
  353. @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;
  354. }
  355. &:hover::after,
  356. .group:hover &::after {
  357. @apply w-30px;
  358. }
  359. }
  360. .btn-primary {
  361. @apply bg-gradient-to-r from-[#779EFF] to-[#0A50FF] border-none outline-none hover:opacity-80;
  362. }
  363. @keyframes fadeInDown {
  364. from {
  365. opacity: 0;
  366. transform: translateY(-10px);
  367. }
  368. to {
  369. opacity: 1;
  370. transform: translateY(0);
  371. }
  372. }
  373. @keyframes fadeIn {
  374. from {
  375. opacity: 0;
  376. transform: translateY(-5px);
  377. }
  378. to {
  379. opacity: 1;
  380. transform: translateY(0);
  381. }
  382. }
  383. .animate-fade-in {
  384. animation: fadeIn 0.3s ease-out forwards;
  385. }
  386. .animate-fade-in-down {
  387. animation: fadeInDown 0.2s ease-out forwards;
  388. &::before {
  389. content: '';
  390. @apply absolute -top-10px left-0 w-full h-10px;
  391. }
  392. }
  393. .mobile-nav-item {
  394. @apply py-16px border-b border-gray-100 text-#334155 active:text-#0F67F8 transition-colors;
  395. }
  396. .safe-area-bottom {
  397. padding-bottom: calc(24px + env(safe-area-inset-bottom));
  398. }
  399. </style>