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

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