Hanye官网
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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