Hanye官网
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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