Header.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <!--
  2. * @Author: LiZhiWei
  3. * @Date: 2026-01-13 15:41:49
  4. * @LastEditors: LiZhiWei
  5. * @LastEditTime: 2026-01-19 09:33:54
  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-xs:px-15px"
  16. >
  17. <i class="i-custom-logo w-160px h-32px lt-sm:w-213px lt-sm:h-64px"></i>
  18. <nav
  19. class="hidden sm:flex items-center gap-20px xl:gap-52px text-16px xl:text-16px text-#334155 h-full"
  20. >
  21. <NuxtLink to="/" class="nav-link flex items-center">首页</NuxtLink>
  22. <NuxtLink to="/" class="nav-link flex items-center">产品中心</NuxtLink>
  23. <div class="group h-full flex items-center">
  24. <NuxtLink to="/" class="nav-link flex items-center">解决方案</NuxtLink>
  25. <!-- Mega Menu -->
  26. <div
  27. 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"
  28. >
  29. <div class="landing-container py-40px flex">
  30. <!-- Left Sidebar -->
  31. <div class="w-240px border-r border-gray-100 pr-40px shrink-0">
  32. <div class="text-18px font-600 mb-20px text-#1e293b">解决方案分类</div>
  33. <div class="flex flex-col gap-4px">
  34. <div
  35. v-for="(cat, index) in solutionCategories"
  36. :key="index"
  37. class="px-16px py-12px rounded-4px cursor-pointer text-14px transition-colors"
  38. :class="
  39. activeCategory === index
  40. ? 'bg-#ECEFF6 text-#0F67F8 font-500'
  41. : 'text-#091221/70'
  42. "
  43. @mouseenter="activeCategory = index"
  44. >
  45. {{ cat.name }}
  46. </div>
  47. </div>
  48. </div>
  49. <!-- Right Content -->
  50. <div class="flex-1 pl-60px">
  51. <div class="grid grid-cols-2 gap-x-60px gap-y-40px">
  52. <div
  53. v-for="(item, idx) in currentItems"
  54. :key="idx"
  55. class="flex gap-16px group/item cursor-pointer"
  56. >
  57. <!-- Icon -->
  58. <i :class="[item.icon, 'wh-48px']"></i>
  59. <!-- Text -->
  60. <div>
  61. <div
  62. class="text-16px font-600 text-#1e293b mb-8px group-hover/item:text-#2563eb transition-colors"
  63. >
  64. {{ item.title }}
  65. </div>
  66. <div class="text-12px text-#64748b lh-20px line-clamp-2">{{ item.desc }}</div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <NuxtLink to="/" class="nav-link flex items-center">客户案例</NuxtLink>
  75. <NuxtLink to="/" class="nav-link flex items-center">关于绘家</NuxtLink>
  76. <NuxtLink to="/" class="nav-link flex items-center">联系合作</NuxtLink>
  77. </nav>
  78. <div class="flex items-center gap-30px lt-sm:hidden">
  79. <span class="flex items-center gap-14px hidden sm:flex">
  80. <i class="i-custom-telephone wh-28px"></i>
  81. <span class="font-s-28px font-bold text-#28292E d-din-pro-600-semibold">
  82. 400-600-7709
  83. </span>
  84. </span>
  85. <button
  86. class="btn-primary text-white font-medium w-134px h-40px pf-sc-medium font-s-16px rounded-8px hidden sm:block"
  87. @click="openConsultation"
  88. >
  89. <span class="lh-20px">申请试用</span>
  90. </button>
  91. </div>
  92. <button class="sm:hidden text-#334155" @click="isMobileMenuOpen = !isMobileMenuOpen">
  93. <i v-if="!isMobileMenuOpen" class="i-custom-menu lt-sm:wh-48px"></i>
  94. <i v-else class="i-ep-close lt-sm:wh-48px"></i>
  95. </button>
  96. </div>
  97. </header>
  98. <!-- Mobile Menu Overlay -->
  99. <div
  100. v-if="isMobileMenuOpen"
  101. class="fixed inset-0 top-80px lt-sm:top-128px lt-xs:top-60px bg-white z-90 sm:hidden flex flex-col p-20px animate-fade-in-down"
  102. >
  103. <nav class="flex flex-col gap-20px text-16px text-#334155 font-500">
  104. <NuxtLink to="/" class="py-10px border-b border-gray-100" @click="isMobileMenuOpen = false">
  105. 首页
  106. </NuxtLink>
  107. <NuxtLink to="/" class="py-10px border-b border-gray-100" @click="isMobileMenuOpen = false">
  108. 产品中心
  109. </NuxtLink>
  110. <div class="py-10px border-b border-gray-100">
  111. <div class="mb-10px">解决方案</div>
  112. <div class="pl-16px flex flex-col gap-10px text-14px text-gray-500">
  113. <div v-for="(cat, idx) in solutionCategories" :key="idx">
  114. <div class="font-600 text-gray-700 mb-4px">{{ cat.name }}</div>
  115. <div class="pl-8px flex flex-col gap-6px">
  116. <div v-for="(item, i) in cat.items" :key="i" class="py-2px">
  117. {{ item.title }}
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  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. <NuxtLink to="/" class="py-10px border-b border-gray-100" @click="isMobileMenuOpen = false">
  130. 联系合作
  131. </NuxtLink>
  132. </nav>
  133. <div class="mt-auto pt-20px border-t border-gray-100">
  134. <div class="flex items-center gap-10px mb-20px justify-center">
  135. <i class="i-custom-telephone wh-24px"></i>
  136. <span class="font-s-20px font-bold text-#28292E">400-600-7709</span>
  137. </div>
  138. <button
  139. class="btn-primary text-white font-medium w-full h-44px rounded-8px text-16px"
  140. @click="
  141. () => {
  142. openConsultation()
  143. isMobileMenuOpen = false
  144. }
  145. "
  146. >
  147. 申请试用
  148. </button>
  149. </div>
  150. </div>
  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. @media (max-width: 767px) {
  228. @apply bg-white/80 backdrop-blur-12px shadow-[0_4px_20px_rgba(0,0,0,0.05)] border-b border-white/10;
  229. }
  230. }
  231. .nav-link {
  232. @apply relative py-8px text-[var(--hj-text-2)] transition-all duration-200 ease;
  233. &:hover,
  234. .group:hover & {
  235. @apply text-[var(--hj-primary)] font-600;
  236. }
  237. &::after {
  238. @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;
  239. }
  240. &:hover::after,
  241. .group:hover &::after {
  242. @apply w-30px;
  243. }
  244. }
  245. .btn-primary {
  246. @apply bg-gradient-to-r from-[#779EFF] to-[#0A50FF] border-none outline-none hover:opacity-80;
  247. }
  248. @keyframes fadeInDown {
  249. from {
  250. opacity: 0;
  251. transform: translateY(-10px);
  252. }
  253. to {
  254. opacity: 1;
  255. transform: translateY(0);
  256. }
  257. }
  258. .animate-fade-in-down {
  259. animation: fadeInDown 0.2s ease-out forwards;
  260. &::before {
  261. content: '';
  262. @apply absolute -top-10px left-0 w-full h-10px;
  263. }
  264. }
  265. </style>