Header.vue 11 KB

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