Hanye官网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244
  1. <template>
  2. <div>
  3. <div class="w-full h-[88px] md:h-[0]"></div>
  4. <!-- 轮播图 -->
  5. <section class="max-w-full mb-12 md:mb-32 xl:px-8 lg:px-6 md:px-4 px-4">
  6. <Swiper
  7. :modules="[Pagination, Autoplay, EffectCreative]"
  8. :slides-per-view="1"
  9. :space-between="30"
  10. :loop="true"
  11. :pagination="{ el: '.swiper-pagination-1', clickable: true }"
  12. :autoplay="{
  13. delay: 5000,
  14. disableOnInteraction: false,
  15. pauseOnMouseEnter: true,
  16. waitForTransition: true,
  17. }"
  18. effect="creative"
  19. :creativeEffect="{
  20. prev: {
  21. shadow: true,
  22. translate: ['-120%', 0, -500],
  23. rotate: [0, 0, -90],
  24. opacity: 0,
  25. },
  26. next: {
  27. shadow: true,
  28. translate: ['120%', 0, -500],
  29. rotate: [0, 0, 90],
  30. opacity: 0,
  31. },
  32. }"
  33. :speed="1000"
  34. :grabCursor="true"
  35. :parallax="true"
  36. class="h-[320px] sm:h-[320px] md:h-[768px] lg:h-[900px] swiper-container-1"
  37. >
  38. <SwiperSlide v-if="!isMobile">
  39. <div class="max-w-screen-2xl mx-auto h-full relative">
  40. <video
  41. :src="homeA3Webp"
  42. autoplay
  43. muted
  44. loop
  45. class="w-full h-full object-cover"
  46. ></video>
  47. <div
  48. class="w-full h-full flex-col justify-center hidden md:flex absolute top-0 left-0 z-10"
  49. >
  50. <div class="justify-center">
  51. <span class="text-white text-6xl font-normal leading-[78px]">{{
  52. t("home.carousel.three.title")
  53. }}</span>
  54. <span class="text-white text-6xl font-normal leading-[78px]">{{
  55. t("home.carousel.three.description")
  56. }}</span>
  57. <br />
  58. <span class="text-white text-6xl font-normal leading-[78px]">{{
  59. t("home.carousel.three.description2")
  60. }}</span
  61. ><br />
  62. <span
  63. class="text-cyan-400 text-6xl font-normal leading-[78px]"
  64. >{{ t("home.carousel.three.description3") }}</span
  65. >
  66. </div>
  67. <div class="flex flex-col gap-2 mt-4">
  68. <div
  69. class="flex items-center gap-2 text-stone-50 text-xl font-normal"
  70. >
  71. <div class="w-2 h-2 bg-white rounded-full"></div>
  72. {{ t("home.carousel.three.description4") }}
  73. </div>
  74. <div
  75. class="flex items-center gap-2 text-stone-50 text-xl font-normal"
  76. >
  77. <div class="w-2 h-2 bg-white rounded-full"></div>
  78. {{ t("home.carousel.three.description5") }}
  79. </div>
  80. </div>
  81. <div
  82. class="w-36 h-14 mt-12 flex items-center justify-center bg-[#35F1FF] rounded-lg hover:bg-[#35F1FF]/80 transition-colors duration-300"
  83. >
  84. <nuxt-link
  85. :to="`${homepagePath}/about`"
  86. class="w-full h-full !flex items-center justify-center text-zinc-900"
  87. >
  88. {{ t("products.view_details") }}
  89. </nuxt-link>
  90. </div>
  91. </div>
  92. </div>
  93. </SwiperSlide>
  94. <SwiperSlide>
  95. <div
  96. class="max-w-screen-2xl mx-auto h-full relative"
  97. :style="{
  98. backgroundImage: `url(${homeA1Webp})`,
  99. backgroundSize: 'cover',
  100. backgroundPosition: 'center',
  101. backgroundRepeat: 'no-repeat',
  102. }"
  103. >
  104. <div
  105. class="w-full h-full flex-col justify-center flex gap-2 select-none relative z-10"
  106. >
  107. <div
  108. class="rounded border border-white w-12 h-8 bg-white/10 backdrop-blur-md leading-none justify-center flex items-center text-white text-sm font-normal"
  109. >
  110. SSD
  111. </div>
  112. <div class="justify-center flex flex-col gap-2">
  113. <span
  114. class="text-white md:text-6xl text-1xl sm:text-2xl font-normal"
  115. >{{ t("home.carousel.one.title") }}</span
  116. >
  117. <span
  118. class="text-white md:text-6xl text-1xl sm:text-2xl font-normal"
  119. >{{ t("home.carousel.one.description") }}</span
  120. >
  121. <span
  122. class="text-white md:text-6xl text-1xl sm:text-2xl font-normal"
  123. >{{ t("home.carousel.one.description2") }}</span
  124. >
  125. <span
  126. class="text-cyan-400 md:text-6xl text-1xl sm:text-2xl font-normal"
  127. >{{ t("home.carousel.one.description3") }}</span
  128. >
  129. </div>
  130. <div class="md:flex hidden flex-col gap-2 mt-4">
  131. <div
  132. class="flex items-center gap-2 text-stone-50 text-xl font-normal"
  133. >
  134. <div class="w-2 h-2 bg-white rounded-full"></div>
  135. {{ t("home.carousel.one.description4") }}
  136. </div>
  137. <div
  138. class="flex items-center gap-2 text-stone-50 text-xl font-normal"
  139. >
  140. <div class="w-2 h-2 bg-white rounded-full"></div>
  141. {{ t("home.carousel.one.description5") }}
  142. </div>
  143. </div>
  144. <div
  145. class="md:w-36 w-28 md:h-14 h-10 md:mt-12 mt-2 flex items-center justify-center bg-[#35F1FF] rounded-lg hover:bg-[#35F1FF]/80 transition-colors duration-300"
  146. >
  147. <nuxt-link
  148. :to="`${homepagePath}/products/HE80-2TNLHS`"
  149. class="w-full h-full !flex items-center justify-center text-zinc-900"
  150. >
  151. {{ t("products.view_details") }}
  152. </nuxt-link>
  153. </div>
  154. </div>
  155. </div>
  156. </SwiperSlide>
  157. <div class="max-w-screen-2xl mx-auto relative">
  158. <div
  159. class="swiper-pagination swiper-pagination-1 text-left bottom-1 top-0"
  160. ></div>
  161. </div>
  162. </Swiper>
  163. </section>
  164. <!-- 按分类栏目展示 -->
  165. <section class="max-w-full mb-12 md:mb-32 xl:px-8 lg:px-6 md:px-4 px-4">
  166. <div class="max-w-screen-2xl mx-auto relative">
  167. <div
  168. class="justify-center text-cyan-400 text-base font-normal leading-tight mb-4"
  169. >
  170. {{ t("home.useCategoryTitle") }}
  171. </div>
  172. <div
  173. class="justify-center text-white font-normal mb-8 md:mb-16 text-xl sm:text-2xl md:text-4xl lg:text-6xl"
  174. >
  175. {{ t("home.useCategoryDescription") }}
  176. </div>
  177. </div>
  178. <div class="max-w-screen-2xl mx-auto relative">
  179. <!-- 企业产品 -->
  180. <div
  181. class="flex w-full relative mb-10 xl:mb-40 gap-10 flex-col xl:flex-row"
  182. >
  183. <div
  184. class="select-none relative w-full xl:w-[65%] h-[280px] md:h-[320px] xl:h-[520px] animate-gradient-bg [background:linear-gradient(180deg,#444B55_0%,#98A3B4_95%)] from-zinc-900 to-zinc-800"
  185. >
  186. <img
  187. src="@/assets/images/business.webp"
  188. alt="business"
  189. class="max-h-full pl-0 md:pl-4 pt-0 md:pt-4 relative z-10"
  190. />
  191. <span
  192. class="text-transparent bg-clip-text bg-gradient-to-r from-[rgba(255,255,255,0.05)] to-[rgba(255,255,255,0.08)] absolute hidden xl:block z-0 top-[35%] left-[62%] translate-y-[-50%] translate-x-[-50%] text-[170px] font-bold select-none"
  193. >Business</span
  194. >
  195. <div
  196. class="w-full absolute xl:hidden top-0 left-0 right-0 bottom-0 z-10 flex flex-col justify-center items-end p-4 md:p-8"
  197. >
  198. <div
  199. class="text-white text-4xl md:text-7xl font-bold mb-2 select-none"
  200. >
  201. {{ t("home.business.title") }}
  202. </div>
  203. <div class="justify-center text-white text-xl font-normal mb-8">
  204. {{ t("home.business.description") }}
  205. </div>
  206. <nuxt-link
  207. :to="`${homepagePath}/products?audiences=1`"
  208. class="h-14 px-8 py-3.5 bg-white/10 hover:bg-white/15 rounded-[10px] outline outline-1 outline-white/20 backdrop-blur-md inline-flex flex-col justify-start items-start gap-3.5"
  209. >
  210. <div class="inline-flex justify-start items-center gap-2.5">
  211. {{ t("home.business.view_details") }}
  212. <i class="icon-arrow-right text-xs ml-2"></i>
  213. </div>
  214. </nuxt-link>
  215. </div>
  216. </div>
  217. <div class="relative hidden xl:flex flex-1 flex-col gap-10">
  218. <div class="w-full">
  219. <div class="text-white text-6xl mb-4 mt-4 select-none">
  220. {{ t("home.business.title") }}
  221. </div>
  222. <div class="justify-center text-white text-xl font-normal mb-8">
  223. {{ t("home.business.description") }}
  224. </div>
  225. <nuxt-link
  226. :to="`${homepagePath}/products?audiences=1`"
  227. class="h-14 px-8 py-3.5 bg-white/10 hover:bg-white/15 rounded-[10px] outline outline-1 outline-white/20 backdrop-blur-md inline-flex flex-col justify-start items-start gap-3.5"
  228. >
  229. <div class="inline-flex justify-start items-center gap-2.5">
  230. {{ t("home.business.view_details") }}
  231. <i class="icon-arrow-right text-xs ml-2"></i>
  232. </div>
  233. </nuxt-link>
  234. </div>
  235. </div>
  236. <div
  237. class="bg-zinc-900/60 backdrop-blur-[120px] right-0 bottom-[-30%] static xl:absolute"
  238. >
  239. <div class="w-full h-full grid grid-cols-2">
  240. <nuxt-link
  241. v-for="category in categoryList"
  242. :key="category.id"
  243. class="flex flex-col gap-4 items-center p-4 md:p-12 hover:bg-zinc-900/50 hover:scale-95 transition-all duration-300"
  244. v-show="category.audiences === 1"
  245. :to="`${category.link}`"
  246. >
  247. <img
  248. class="w-[200px] h-[200px] object-contain"
  249. :src="category.image"
  250. />
  251. <div
  252. class="text-center flex justify-center text-white text-base font-bold"
  253. >
  254. {{ category.title }}
  255. </div>
  256. <div
  257. class="text-center text-white/50 text-sm max-w-[280px] line-clamp-2"
  258. >
  259. {{ category.description }}
  260. </div>
  261. </nuxt-link>
  262. </div>
  263. </div>
  264. </div>
  265. <!-- 个人产品 -->
  266. <div
  267. class="flex w-full gap-8 relative mb-0 xl:mb-60 flex-col xl:flex-row"
  268. >
  269. <div
  270. class="flex-1 hidden xl:flex flex-col gap-10 relative top-[-80px]"
  271. >
  272. <div class="w-full">
  273. <div
  274. class="justify-center text-white text-6xl whitespace-nowrap mb-4 mt-20 select-none"
  275. >
  276. {{ t("home.personal.title") }}
  277. </div>
  278. <div class="justify-center text-white text-xl font-normal mb-8">
  279. {{ t("home.personal.description") }}
  280. </div>
  281. <nuxt-link
  282. :to="`${homepagePath}/products?audiences=0`"
  283. class="h-14 px-8 py-3.5 bg-white/10 hover:bg-white/15 rounded-[10px] outline outline-1 outline-white/20 backdrop-blur-md inline-flex flex-col justify-start items-start gap-3.5"
  284. >
  285. <div class="inline-flex justify-start items-center gap-2.5">
  286. {{ t("home.personal.view_details") }}
  287. <i class="icon-arrow-right text-xs ml-2"></i>
  288. </div>
  289. </nuxt-link>
  290. </div>
  291. </div>
  292. <div
  293. class="w-full xl:w-[75%] h-[280px] md:h-[320px] xl:h-[480px] select-none relative z-0 flex justify-end items-end animate-gradient-bg [background:linear-gradient(180deg,#0086f4_0%,#88d5fa_80%)]"
  294. >
  295. <img
  296. src="@/assets/images/personal.webp"
  297. alt="personal"
  298. class="pt-0 md:pt-20 max-h-full relative z-10"
  299. />
  300. <span
  301. class="absolute text-transparent bg-clip-text bg-gradient-to-r from-[rgba(255,255,255,0.08)] to-[rgba(255,255,255,0.05)] hidden xl:block z-0 top-[25%] left-[35%] translate-y-[-50%] translate-x-[-50%] text-[160px] font-bold select-none"
  302. >Personal</span
  303. >
  304. <div
  305. class="flex xl:hidden flex-col gap-10 absolute top-0 left-0 right-0 bottom-0 z-10 justify-center p-4 md:p-8"
  306. >
  307. <div class="w-full">
  308. <div
  309. class="justify-center text-white text-4xl md:text-7xl font-bold mb-2 select-none"
  310. >
  311. {{ t("home.personal.title") }}
  312. </div>
  313. <div class="justify-center text-white text-xl font-normal mb-8">
  314. {{ t("home.personal.description") }}
  315. </div>
  316. <nuxt-link
  317. :to="`${homepagePath}/products?audiences=0`"
  318. class="h-14 px-8 py-3.5 bg-white/10 hover:bg-white/15 rounded-[10px] outline outline-1 outline-white/20 backdrop-blur-md inline-flex flex-col justify-start items-start gap-3.5"
  319. >
  320. <div class="inline-flex justify-start items-center gap-2.5">
  321. {{ t("home.personal.view_details") }}
  322. <i class="icon-arrow-right text-xs ml-2"></i>
  323. </div>
  324. </nuxt-link>
  325. </div>
  326. </div>
  327. </div>
  328. <div
  329. class="bg-zinc-900/60 backdrop-blur-[120px] static left-0 bottom-[-32%] xl:absolute z-2"
  330. >
  331. <div class="w-full h-full grid grid-cols-2 lg:grid-cols-3">
  332. <nuxt-link
  333. v-for="category in categoryList"
  334. :key="category.id"
  335. class="flex flex-col gap-4 items-center py-4 px-4 md:py-12 md:px-6 hover:bg-zinc-900/50 hover:scale-95 transition-all duration-300"
  336. v-show="category.audiences === 0"
  337. :to="`${category.link}`"
  338. >
  339. <img
  340. class="w-[200px] h-[200px] object-contain"
  341. :src="category.image"
  342. />
  343. <div
  344. class="text-center flex justify-center text-white text-base font-bold"
  345. >
  346. {{ category.title }}
  347. </div>
  348. <div
  349. class="text-center text-white/50 text-sm max-w-[280px] line-clamp-2"
  350. >
  351. {{ category.description }}
  352. </div>
  353. </nuxt-link>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. </section>
  359. <!-- 按用途产品展示 -->
  360. <section
  361. v-if="false"
  362. class="max-w-full mb-12 md:mb-32 xl:px-8 lg:px-6 md:px-4 px-4"
  363. >
  364. <div class="max-w-screen-2xl mx-auto relative">
  365. <div
  366. class="justify-center text-cyan-400 text-base font-normal leading-tight mb-4"
  367. >
  368. {{ t("products.usage") }}
  369. </div>
  370. <div
  371. class="justify-center text-white font-normal mb-8 md:mb-16 text-xl sm:text-2xl md:text-4xl lg:text-6xl"
  372. >
  373. {{ t("products.usage_title") }}
  374. </div>
  375. </div>
  376. <div class="max-w-screen-2xl mx-auto">
  377. <div class="w-full mb-8">
  378. <div class="flex flex-wrap items-center gap-2">
  379. <div
  380. v-for="(usage, index) in typedUsageList"
  381. :key="usage.id"
  382. class="cursor-pointer select-none px-4 sm:px-7 py-2 sm:py-3 rounded-full border border-zinc-700 text-white transition-all duration-300 relative group"
  383. :class="{
  384. 'bg-cyan-400 border-zinc-900 pointer-events-none text-zinc-900':
  385. activeIndex === index,
  386. 'hover:border-zinc-600': activeIndex !== index,
  387. }"
  388. @click="handleUsageClick(usage.id)"
  389. >
  390. <div
  391. class="usage-name text-center text-xs sm:text-sm font-normal leading-tight md:text-base transition-colors duration-300 relative z-10"
  392. >
  393. {{ usage.name }}
  394. <!-- 用途名称 -->
  395. </div>
  396. <div
  397. class="absolute inset-0 rounded-full bg-cyan-400/20 scale-0 transition-transform duration-300 group-hover:scale-100"
  398. ></div>
  399. </div>
  400. <div class="flex items-center justify-center gap-4 ml-auto">
  401. <div
  402. class="swiper-button-prev-2 bg-zinc-700 w-8 h-8 sm:w-10 sm:h-10 rounded-full flex items-center justify-center cursor-pointer hover:bg-zinc-600 transition-colors duration-200"
  403. >
  404. <i
  405. class="icon-arrow-left text-zinc-300 text-xs sm:text-sm font-normal"
  406. ></i>
  407. </div>
  408. <div
  409. class="swiper-button-next-2 bg-zinc-700 w-8 h-8 sm:w-10 sm:h-10 rounded-full flex items-center justify-center cursor-pointer hover:bg-zinc-600 transition-colors duration-200"
  410. >
  411. <i
  412. class="icon-arrow-right text-zinc-300 text-xs sm:text-sm font-normal"
  413. ></i>
  414. </div>
  415. </div>
  416. </div>
  417. </div>
  418. </div>
  419. <div class="max-w-screen-2xl mx-auto">
  420. <div
  421. class="w-full h-[420px] sm:h-[300px] md:h-[350px] lg:h-[360px] xl:h-[380px] 2xl:h-[460px] relative"
  422. >
  423. <TransitionGroup name="slide-fade" tag="div" class="relative h-full">
  424. <div :key="activeUsageId" class="w-full h-full">
  425. <Swiper
  426. :modules="[Navigation]"
  427. :spaceBetween="30"
  428. :slidesPerView="4"
  429. :breakpoints="{
  430. 320: { slidesPerView: 1, spaceBetween: 10 },
  431. 448: { slidesPerView: 2, spaceBetween: 10 },
  432. 640: { slidesPerView: 3, spaceBetween: 20 },
  433. 1024: { slidesPerView: 4, spaceBetween: 20 },
  434. 1280: { slidesPerView: 4, spaceBetween: 30 },
  435. 1536: { slidesPerView: 4, spaceBetween: 30 },
  436. }"
  437. :navigation="{
  438. prevEl: '.swiper-button-prev-2',
  439. nextEl: '.swiper-button-next-2',
  440. }"
  441. class="h-full"
  442. >
  443. <SwiperSlide
  444. v-for="product in activeProducts"
  445. :key="product.id"
  446. class="w-full sm:w-1/2 md:w-1/3 lg:w-1/4"
  447. >
  448. <div class="w-full h-full p-2">
  449. <nuxt-link :to="product.link" class="block w-full h-full">
  450. <div
  451. class="w-full h-full bg-zinc-900 rounded-2xl p-4 flex flex-col items-center justify-start relative overflow-hidden group hover:bg-zinc-800 transition-all duration-300 hover:shadow-lg hover:shadow-cyan-400/10"
  452. >
  453. <!-- 图片加载占位 -->
  454. <div
  455. v-if="!isImageLoaded[product.id]"
  456. class="absolute inset-0 bg-gradient-to-br from-zinc-800 via-zinc-700 to-zinc-800 animate-gradient"
  457. >
  458. <div
  459. class="absolute inset-0 flex items-center justify-center"
  460. >
  461. <div
  462. class="w-8 h-8 border-4 border-cyan-400/20 border-t-cyan-400 rounded-full animate-spin"
  463. ></div>
  464. </div>
  465. </div>
  466. <!-- 图片容器 -->
  467. <div
  468. class="w-full aspect-square relative transition-all duration-300 overflow-hidden rounded-lg"
  469. :class="{ 'opacity-0': !isImageLoaded[product.id] }"
  470. >
  471. <img
  472. :src="product.image"
  473. :alt="product.title"
  474. class="w-full h-full object-cover transition-all duration-500 group-hover:scale-110"
  475. @load="handleImageLoad(product.id)"
  476. @error="handleImageError(product.id)"
  477. loading="lazy"
  478. />
  479. <div
  480. class="absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"
  481. ></div>
  482. <!-- 添加查看详情按钮 -->
  483. <div
  484. class="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 transform translate-y-4 group-hover:translate-y-0"
  485. >
  486. <div
  487. class="px-4 py-2 bg-cyan-400/20 backdrop-blur-sm rounded-full text-white text-sm font-medium border border-cyan-400/30 transform transition-transform duration-300 group-hover:scale-105"
  488. >
  489. {{ t("products.view_details") }}
  490. </div>
  491. </div>
  492. </div>
  493. <!-- 文字内容 -->
  494. <div
  495. class="w-full mt-4 min-h-[80px] transition-all duration-300 transform"
  496. :class="{
  497. 'opacity-0 translate-y-4':
  498. !isImageLoaded[product.id],
  499. 'opacity-100 translate-y-0':
  500. isImageLoaded[product.id],
  501. }"
  502. >
  503. <div
  504. class="text-center text-white text-base font-bold leading-tight mb-2 line-clamp-2 group-hover:text-cyan-400 transition-colors duration-300"
  505. >
  506. {{ product.title }}
  507. </div>
  508. <div
  509. class="text-center text-zinc-400 text-sm font-normal leading-tight line-clamp-2 group-hover:text-zinc-300 transition-colors duration-300"
  510. >
  511. {{ product.description }}
  512. </div>
  513. </div>
  514. </div>
  515. </nuxt-link>
  516. </div>
  517. </SwiperSlide>
  518. </Swiper>
  519. </div>
  520. </TransitionGroup>
  521. </div>
  522. </div>
  523. </section>
  524. <!-- 核心展示 -->
  525. <section class="max-w-full mb-12 md:mb-32 xl:px-8 lg:px-6 md:px-4 px-4">
  526. <div
  527. class="max-w-screen-2xl mx-auto grid grid-cols-1 lg:grid-cols-3 md:grid-cols-2 sm:grid-cols-2 gap-4"
  528. >
  529. <div class="inline-flex justify-start items-center gap-5">
  530. <div
  531. class="w-12 h-12 md:w-16 md:h-16 relative bg-gradient-to-b from-neutral-600 to-slate-400 rounded-xl border-b-[1.50px] border-neutral-700 overflow-hidden"
  532. >
  533. <div class="w-full h-full flex items-center justify-center">
  534. <i class="icon-h1 text-white text-5xl"></i>
  535. </div>
  536. </div>
  537. <div class="inline-flex flex-col justify-center items-start flex-1">
  538. <div
  539. class="justify-start text-white font-medium text-1xl md:text-lg"
  540. >
  541. {{ t("products.support") }}
  542. </div>
  543. <div
  544. class="justify-start text-zinc-300 text-xs font-normal md:text-sm"
  545. >
  546. {{ t("products.support_description") }}
  547. </div>
  548. </div>
  549. </div>
  550. <div class="inline-flex justify-start items-center gap-5">
  551. <div
  552. class="w-12 h-12 md:w-16 md:h-16 relative bg-gradient-to-b from-neutral-600 to-slate-400 rounded-xl border-b-[1.50px] border-neutral-700 overflow-hidden"
  553. >
  554. <div class="w-full h-full flex items-center justify-center">
  555. <i class="icon-h2 text-white text-5xl"></i>
  556. </div>
  557. </div>
  558. <div class="inline-flex flex-col justify-center items-start flex-1">
  559. <div
  560. class="justify-start text-white font-medium text-1xl md:text-lg"
  561. >
  562. {{ t("products.development") }}
  563. </div>
  564. <div
  565. class="justify-start text-zinc-300 text-xs font-normal md:text-sm"
  566. >
  567. {{ t("products.development_description") }}
  568. </div>
  569. </div>
  570. </div>
  571. <div class="inline-flex justify-start items-center gap-5">
  572. <div
  573. class="w-12 h-12 md:w-16 md:h-16 relative bg-gradient-to-b from-neutral-600 to-slate-400 rounded-xl border-b-[1.50px] border-neutral-700 overflow-hidden"
  574. >
  575. <div class="w-full h-full flex items-center justify-center">
  576. <i class="icon-h3 text-white text-5xl"></i>
  577. </div>
  578. </div>
  579. <div class="inline-flex flex-col justify-center items-start flex-1">
  580. <div
  581. class="justify-start text-white font-medium text-1xl md:text-lg"
  582. >
  583. {{ t("products.develop") }}
  584. </div>
  585. <div
  586. class="justify-start text-zinc-300 text-xs font-normal md:text-sm"
  587. >
  588. {{ t("products.develop_description") }}
  589. </div>
  590. </div>
  591. </div>
  592. </div>
  593. </section>
  594. <!-- 关于我们 -->
  595. <section class="max-w-full mb-12 md:mb-32 xl:px-8 lg:px-6 md:px-4 px-4">
  596. <div class="max-w-screen-2xl mx-auto relative">
  597. <div
  598. class="justify-center text-cyan-400 text-base font-normal leading-tight mb-4"
  599. >
  600. {{ t("products.strong_point") }}
  601. </div>
  602. <div
  603. class="justify-center text-white font-normal mb-8 md:mb-16 text-xl sm:text-2xl md:text-4xl lg:text-6xl"
  604. >
  605. {{ t("products.strong_point_title") }}
  606. </div>
  607. <div
  608. class="absolute right-0 top-1/2 -translate-y-1/2 z-10 lg:block hidden"
  609. >
  610. <div class="flex items-center justify-center gap-4">
  611. <div
  612. class="swiper-button-prev-3 bg-zinc-700 w-10 h-10 rounded-full flex items-center justify-center cursor-pointer hover:bg-zinc-600 transition-colors duration-200"
  613. >
  614. <i class="icon-arrow-left text-zinc-300 text-sm font-normal"></i>
  615. </div>
  616. <div
  617. class="swiper-button-next-3 bg-zinc-700 w-10 h-10 rounded-full flex items-center justify-center cursor-pointer hover:bg-zinc-600 transition-colors duration-200"
  618. >
  619. <i class="icon-arrow-right text-zinc-300 text-sm font-normal"></i>
  620. </div>
  621. </div>
  622. </div>
  623. </div>
  624. <div class="max-w-screen-2xl mx-auto">
  625. <div class="w-full relative max-w-full">
  626. <Swiper
  627. :modules="[Navigation, Pagination]"
  628. slides-per-view="auto"
  629. :space-between="30"
  630. :pagination="{ el: '.swiper-pagination-3', clickable: true }"
  631. :navigation="{
  632. prevEl: '.swiper-button-prev-3',
  633. nextEl: '.swiper-button-next-3',
  634. }"
  635. class="h-auto sm:h-[360px] md:h-[480px] lg:h-[720px] max-w-full"
  636. >
  637. <SwiperSlide class="!max-w-screen-2xl !w-full">
  638. <div
  639. class="w-full h-full flex items-center px-0 md:px-20"
  640. :style="{
  641. backgroundImage: `url(${homeC1Webp})`,
  642. backgroundSize: 'cover',
  643. backgroundPosition: 'center',
  644. backgroundRepeat: 'no-repeat',
  645. }"
  646. >
  647. <div
  648. class="w-[100%] md:w-[60%] h-[100%] md:h-auto bg-white/5 rounded-0 md:rounded-2xl backdrop-blur-[50px] px-4 py-8 md:py-12 md:px-8 flex flex-col gap-8 border border-white/10"
  649. >
  650. <div
  651. class="opacity-90 justify-start text-white text-2xl font-normal md:text-4xl"
  652. >
  653. {{ t("about.companyInfo.name") }}
  654. </div>
  655. <div
  656. class="opacity-70 justify-start text-white text-base md:text-lg font-normal leading-relaxed whitespace-pre-wrap"
  657. >
  658. {{ t("about.companyInfo.description") }}
  659. </div>
  660. </div>
  661. </div>
  662. </SwiperSlide>
  663. </Swiper>
  664. </div>
  665. <div class="max-w-screen-2xl mx-auto relative">
  666. <div class="swiper-pagination swiper-pagination-3"></div>
  667. </div>
  668. </div>
  669. </section>
  670. <!-- 产品咨询 -->
  671. <section class="max-w-full h-[240px] md:h-[480px] bg-black/80 md:block">
  672. <div class="h-full relative">
  673. <div
  674. class="absolute top-0 left-0 w-full h-full flex flex-col gap-6 items-center justify-center z-10"
  675. >
  676. <h1
  677. class="text-center justify-start text-white font-normal text-xl sm:text-xl md:text-3xl px-4 sm:px-2"
  678. >
  679. {{ t("products.consultation") }}
  680. </h1>
  681. <nuxt-link
  682. :to="`${homepagePath}/contact`"
  683. class="w-32 h-10 md:w-40 md:h-11 bg-zinc-300/10 rounded-lg outline outline-1 flex items-center justify-center gap-2 outline-white/20 backdrop-blur-[10px] cursor-pointer hover:bg-zinc-300/20 transition-colors duration-200"
  684. >
  685. <span class="text-base font-normal">{{
  686. t("products.consultation_button")
  687. }}</span>
  688. <i class="icon-arrow-right text-sm font-normal"></i>
  689. </nuxt-link>
  690. </div>
  691. <img
  692. v-if="isMobile"
  693. :src="videoWebp"
  694. alt="video"
  695. class="w-full h-full object-cover opacity-20"
  696. />
  697. <video
  698. v-else
  699. :src="videoSrc"
  700. autoplay
  701. muted
  702. loop
  703. :poster="videoWebp"
  704. class="w-full h-full object-cover opacity-20"
  705. ></video>
  706. </div>
  707. </section>
  708. </div>
  709. </template>
  710. <script setup lang="ts">
  711. import { Swiper, SwiperSlide } from "swiper/vue";
  712. import {
  713. Navigation,
  714. Pagination,
  715. Autoplay,
  716. EffectCreative,
  717. } from "swiper/modules";
  718. import "swiper/css";
  719. import "swiper/css/navigation";
  720. import "swiper/css/pagination";
  721. import { useBreakpoints, breakpointsTailwind } from "@vueuse/core";
  722. import { useI18n, useRoute, useAsyncData, queryCollection } from "#imports";
  723. import video from "@/assets/videos/video.mp4";
  724. import videoWebp from "@/assets/videos/video.webp";
  725. import homeA1Webp from "@/assets/images/home-a-1.webp";
  726. import homeA2Webp from "@/assets/images/home-a-2.webp";
  727. import homeA3Webp from "@/assets/videos/banner03.mp4";
  728. import homeC1Webp from "@/assets/images/home-c-1.webp";
  729. // 数据类型定义
  730. interface Product {
  731. id: number;
  732. title: string;
  733. image: string;
  734. link: string;
  735. description?: string;
  736. name?: string;
  737. }
  738. interface Usage {
  739. id: number;
  740. name: string;
  741. category?: string;
  742. products: Product[];
  743. }
  744. interface Category {
  745. id: number;
  746. title: string;
  747. description: string;
  748. capacities: string[];
  749. summary: string;
  750. sort: number;
  751. image: string;
  752. link: string;
  753. audiences: number;
  754. }
  755. // 使用i18n
  756. const { t, locale } = useI18n();
  757. // 默认语言
  758. const defaultLocale = "zh";
  759. // 获取路由
  760. const route = useRoute();
  761. // 断点
  762. const breakpoints = useBreakpoints(breakpointsTailwind);
  763. // 是否移动端
  764. const isMobile = breakpoints.smaller("md");
  765. const videoSrc = ref(video);
  766. /**
  767. * 使用计算属性获取当前语言的数据文件URL
  768. */
  769. const usageDataUrl = computed(() => {
  770. return `/data/usages-${locale.value}.json`;
  771. });
  772. const categoryDataUrl = computed(() => {
  773. return `/data/categories-${locale.value}.json`;
  774. });
  775. const productsDataUrl = computed(() => {
  776. return `/data/products-${locale.value}.json`;
  777. });
  778. const homepagePath = computed(() => {
  779. return locale.value === "zh" ? "" : `/${locale.value}`;
  780. });
  781. // 获取按用途产品数据
  782. const usageList = ref<Usage[]>([]);
  783. const isLoadingUsage = ref(true);
  784. const activeUsageId = ref(1);
  785. // 获取按分类栏目数据
  786. const categoryList = ref<Category[]>([]);
  787. const isLoadingCategory = ref(true);
  788. // 加载用途数据
  789. const loadUsageData = async () => {
  790. try {
  791. isLoadingUsage.value = true;
  792. // 使用fetch获取数据
  793. if (process.client) {
  794. const response = await fetch(usageDataUrl.value);
  795. if (!response.ok) {
  796. throw new Error(`加载用途数据失败: ${response.status}`);
  797. }
  798. const usageData = await response.json();
  799. // 加载对应的产品数据
  800. const productsResponse = await fetch(productsDataUrl.value);
  801. if (!productsResponse.ok) {
  802. throw new Error(`加载产品数据失败: ${productsResponse.status}`);
  803. }
  804. const productsData = await productsResponse.json();
  805. // 处理数据
  806. usageList.value = usageData
  807. .map((usage: any) => {
  808. // 为每种用途找到对应的产品
  809. const usageProducts = [];
  810. // 按照正确的设计模式:使用用途的title与产品的usage数组进行匹配
  811. // 找出所有usage属性包含当前用途title的产品
  812. const matchedProducts = productsData.filter(
  813. (product: any) =>
  814. product.usage &&
  815. Array.isArray(product.usage) &&
  816. product.usage.includes(usage.title)
  817. );
  818. // 将匹配的产品添加到列表
  819. if (matchedProducts.length > 0) {
  820. matchedProducts.forEach((product: any) => {
  821. usageProducts.push({
  822. id: product.id,
  823. title: product.title,
  824. image: product.image,
  825. link: `${homepagePath.value}/products/${product.name}`,
  826. description: product.summary,
  827. });
  828. });
  829. } else {
  830. // 如果没有找到匹配的产品,添加一个占位产品
  831. usageProducts.push({
  832. id: `placeholder-${usage.id}`,
  833. title: usage.title,
  834. image: ``,
  835. link: `${homepagePath.value}/products?usage=${encodeURIComponent(
  836. usage.title
  837. )}`,
  838. description: "",
  839. });
  840. }
  841. return {
  842. id: parseInt(usage.id) || 0,
  843. name: usage.title,
  844. category: usage.category || "",
  845. products: usageProducts,
  846. };
  847. })
  848. .sort((a: any, b: any) => a.id - b.id);
  849. // 设置默认选中的用途
  850. if (usageList.value.length > 0) {
  851. activeUsageId.value = usageList.value[0].id;
  852. }
  853. }
  854. } catch (error) {
  855. console.error("Error loading usage data:", error);
  856. } finally {
  857. isLoadingUsage.value = false;
  858. }
  859. };
  860. // 加载分类数据
  861. const loadCategoryData = async () => {
  862. try {
  863. isLoadingCategory.value = true;
  864. // 使用fetch获取数据
  865. if (process.client) {
  866. const response = await fetch(categoryDataUrl.value);
  867. if (!response.ok) {
  868. throw new Error(`加载分类数据失败: ${response.status}`);
  869. }
  870. const data = await response.json();
  871. // 处理数据
  872. categoryList.value = data
  873. .map((category: any) => {
  874. return {
  875. id: parseInt(category.id) || 0,
  876. title: category.title || "",
  877. description: category.description || "",
  878. image: category.image || "",
  879. link: `${homepagePath.value}/products?category=${encodeURIComponent(
  880. category.title
  881. )}&audiences=${category.audiences}`,
  882. capacities: category.capacities || [],
  883. summary: category.summary || "",
  884. sort: category.sort || 0,
  885. audiences: category.audiences,
  886. };
  887. })
  888. .sort((a: any, b: any) => a.id - b.id);
  889. }
  890. } catch (error) {
  891. console.error("Error loading category data:", error);
  892. } finally {
  893. isLoadingCategory.value = false;
  894. }
  895. };
  896. // 当页面加载或语言改变时加载数据
  897. onMounted(() => {
  898. loadUsageData();
  899. loadCategoryData();
  900. });
  901. watch(locale, () => {
  902. loadUsageData();
  903. loadCategoryData();
  904. });
  905. // 计算当前用途列表
  906. const typedUsageList = computed(() => {
  907. return usageList.value as Usage[];
  908. });
  909. // 计算当前激活的索引
  910. const activeIndex = computed(() => {
  911. return typedUsageList.value.findIndex(
  912. (item) => item.id === activeUsageId.value
  913. );
  914. });
  915. const activeProducts = computed(() => {
  916. const currentUsage = typedUsageList.value.find(
  917. (item: Usage) => item.id === activeUsageId.value
  918. );
  919. return currentUsage?.products || [];
  920. });
  921. // 图片加载状态
  922. const isImageLoaded = ref<Record<number, boolean>>({});
  923. const imageErrors = ref<Record<number, boolean>>({});
  924. // 监听图片加载状态
  925. watch(
  926. activeProducts,
  927. (newProducts: Product[]) => {
  928. if (process.client) {
  929. newProducts.forEach((product: Product) => {
  930. if (product.image) {
  931. const img = new window.Image();
  932. img.onload = () => handleImageLoad(product.id);
  933. img.onerror = () => handleImageError(product.id);
  934. img.src = product.image;
  935. }
  936. });
  937. }
  938. },
  939. { immediate: true }
  940. );
  941. // 处理图片加载
  942. const handleImageLoad = (id: number) => {
  943. if (process.client) {
  944. isImageLoaded.value[id] = true;
  945. imageErrors.value[id] = false;
  946. }
  947. };
  948. // 处理图片加载错误
  949. const handleImageError = (id: number) => {
  950. if (process.client) {
  951. console.error(`Failed to load image for product ${id}`);
  952. isImageLoaded.value[id] = true;
  953. imageErrors.value[id] = true;
  954. }
  955. };
  956. // 处理用途点击
  957. const handleUsageClick = (id: number) => {
  958. if (process.client) {
  959. // 重置图片加载状态
  960. isImageLoaded.value = {};
  961. imageErrors.value = {};
  962. activeUsageId.value = id;
  963. }
  964. };
  965. // 计算当前分类列表
  966. const typedCategoryList = computed(() => {
  967. return categoryList.value as Category[];
  968. });
  969. // SEO优化
  970. useHead({
  971. title: t("home.title") + " - Hanye",
  972. meta: [
  973. {
  974. name: "description",
  975. content: t("home.description"),
  976. },
  977. {
  978. name: "keywords",
  979. content: t("home.keywords"),
  980. },
  981. ],
  982. });
  983. </script>
  984. <style lang="scss" scoped>
  985. :deep(.swiper-pagination-3) {
  986. margin: auto;
  987. position: static;
  988. padding: 1rem 0;
  989. }
  990. :deep(.swiper-pagination-bullet) {
  991. background-color: var(--color-bg); /* Example color */
  992. border: 2px solid var(--color-text);
  993. }
  994. :deep(.swiper-pagination-bullet-active) {
  995. background-color: var(--color-text); /* Example color */
  996. }
  997. .use-business {
  998. background-image: url("@/assets/images/business.webp");
  999. background-size: auto 548px;
  1000. background-position: left top;
  1001. background-repeat: no-repeat;
  1002. }
  1003. .use-personal {
  1004. background-image: url("@/assets/images/personal.webp");
  1005. background-size: auto 480px;
  1006. background-position: right bottom;
  1007. background-repeat: no-repeat;
  1008. }
  1009. // 优化过渡动画
  1010. .slide-fade-enter-active,
  1011. .slide-fade-leave-active {
  1012. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  1013. position: absolute;
  1014. width: 100%;
  1015. height: 300px;
  1016. }
  1017. @media (min-width: 640px) {
  1018. .slide-fade-enter-active,
  1019. .slide-fade-leave-active {
  1020. height: 350px;
  1021. }
  1022. }
  1023. @media (min-width: 768px) {
  1024. .slide-fade-enter-active,
  1025. .slide-fade-leave-active {
  1026. height: 400px;
  1027. }
  1028. }
  1029. @media (min-width: 1024px) {
  1030. .slide-fade-enter-active,
  1031. .slide-fade-leave-active {
  1032. height: 450px;
  1033. }
  1034. }
  1035. .slide-fade-enter-from {
  1036. opacity: 0;
  1037. transform: translateX(30px);
  1038. }
  1039. .slide-fade-leave-to {
  1040. opacity: 0;
  1041. transform: translateX(-30px);
  1042. }
  1043. // 添加响应式优化
  1044. @media (max-width: 640px) {
  1045. .slide-fade-enter-from,
  1046. .slide-fade-leave-to {
  1047. transform: translateX(15px);
  1048. }
  1049. }
  1050. // 优化图片加载动画
  1051. @keyframes gradient {
  1052. 0% {
  1053. background-position: 0% 50%;
  1054. }
  1055. 50% {
  1056. background-position: 100% 50%;
  1057. }
  1058. 100% {
  1059. background-position: 0% 50%;
  1060. }
  1061. }
  1062. .animate-gradient {
  1063. background-size: 200% 200%;
  1064. animation: gradient 3s ease infinite;
  1065. }
  1066. // 移除 pagination 相关样式
  1067. :deep(.swiper-pagination-2) {
  1068. display: none;
  1069. }
  1070. // 添加导航按钮禁用样式
  1071. :deep(.swiper-button-disabled) {
  1072. opacity: 0.35;
  1073. cursor: not-allowed;
  1074. pointer-events: none;
  1075. }
  1076. // 优化轮播图样式
  1077. :deep(.swiper-container-1) {
  1078. .swiper-slide {
  1079. transition: all 0.5s ease;
  1080. transform-origin: center center;
  1081. backface-visibility: hidden;
  1082. perspective: 1000px;
  1083. }
  1084. .swiper-pagination-bullet {
  1085. width: 12px;
  1086. height: 12px;
  1087. background: transparent;
  1088. border: 2px solid rgba(255, 255, 255, 0.5);
  1089. opacity: 1;
  1090. transition: all 0.3s ease;
  1091. margin: 0 8px !important;
  1092. &-active {
  1093. background: #fff;
  1094. border-color: #fff;
  1095. transform: scale(1.2);
  1096. }
  1097. }
  1098. .swiper-pagination {
  1099. display: flex;
  1100. justify-content: center;
  1101. align-items: center;
  1102. padding: 20px 0;
  1103. }
  1104. }
  1105. // 优化图片加载动画
  1106. @keyframes fadeIn {
  1107. from {
  1108. opacity: 0;
  1109. transform: scale(1.1);
  1110. }
  1111. to {
  1112. opacity: 1;
  1113. transform: scale(1);
  1114. }
  1115. }
  1116. .swiper-slide-active {
  1117. img {
  1118. animation: fadeIn 0.8s ease-out forwards;
  1119. }
  1120. }
  1121. // 优化产品卡片动画和交互
  1122. .swiper-slide {
  1123. a {
  1124. text-decoration: none;
  1125. display: block;
  1126. height: 100%;
  1127. &:hover {
  1128. text-decoration: none;
  1129. }
  1130. > div {
  1131. position: relative;
  1132. z-index: 1;
  1133. cursor: pointer;
  1134. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  1135. &:hover {
  1136. transform: translateY(-2px);
  1137. box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  1138. }
  1139. }
  1140. }
  1141. }
  1142. // 移除卡片抖动动画
  1143. @keyframes cardHover {
  1144. 0% {
  1145. transform: translateY(0);
  1146. }
  1147. 100% {
  1148. transform: translateY(-2px);
  1149. }
  1150. }
  1151. // 添加渐变背景动画
  1152. @keyframes gradient-bg {
  1153. 0% {
  1154. background-position: 0% 50%;
  1155. opacity: 1;
  1156. }
  1157. 50% {
  1158. background-position: 100% 50%;
  1159. opacity: 0.85;
  1160. }
  1161. 100% {
  1162. background-position: 0% 50%;
  1163. opacity: 1;
  1164. }
  1165. }
  1166. .animate-gradient-bg {
  1167. background-size: 200% 200%;
  1168. animation: gradient-bg 15s ease infinite;
  1169. }
  1170. </style>