IndexView.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261
  1. <script setup>
  2. import Layout from '../components/common/Layout.vue';
  3. import { onBeforeUnmount, onMounted, ref, computed } from "vue";
  4. import { onLanguageChange, getCurrentLanguage } from '@/utils/language.js';
  5. import c1 from '../assets/images/newIndex/c1.png';
  6. import c2 from '../assets/images/newIndex/c2.png';
  7. import c3 from '../assets/images/newIndex/c3.png';
  8. import bannner from '../assets/images/banner.png';
  9. import { useRouter } from 'vue-router';
  10. import zhounian from '../assets/images/newIndex/80zhounian.jpg';
  11. import p1 from '../assets/images/newsPic/20251117.png';
  12. import p2 from '../assets/images/newsPic/20250904.png';
  13. import { useI18n } from 'vue-i18n'
  14. const { locale, messages } = useI18n()
  15. // 当前语言(可在模板或逻辑中使用)
  16. const currentLanguage = ref(getCurrentLanguage());
  17. // 存储取消订阅函数
  18. const offLanguageListener = ref(null);
  19. // 导入swiper组件
  20. import { Swiper, SwiperSlide } from "swiper/vue";
  21. // 引入swiper样式(按需导入)
  22. import "swiper/css";
  23. import "swiper/css/pagination"; // 轮播图底面的小圆点
  24. import "swiper/css/autoplay"; // 自动播放样式
  25. // 引入swiper核心和所需模块
  26. import { Mousewheel, Pagination, Autoplay } from "swiper/modules";
  27. const modules = [Mousewheel, Pagination, Autoplay];
  28. // swiper实例
  29. const homeSwiper = ref(null);
  30. // 初始化
  31. const onSwiper = (swiper) => {
  32. homeSwiper.value = swiper;
  33. };
  34. // swiper切换时触发
  35. // eslint-disable-next-line no-unused-vars
  36. const onSlideChange = (swiper) => {
  37. };
  38. const tabIndex = ref(0)
  39. const slideshow = ref([
  40. {
  41. ImageUrl: bannner,
  42. }
  43. ])
  44. const newImg = ref([
  45. {
  46. ImageUrl: p2,
  47. },
  48. {
  49. ImageUrl: p1,
  50. },
  51. {
  52. ImageUrl: zhounian,
  53. },
  54. ])
  55. // eslint-disable-next-line no-unused-vars
  56. const advantageList = ref([
  57. { id: 1, Cover: c3, title: '烟叶业务', desc: '我们的烟叶业务是从全球主要烟叶产区采购各类型烟叶类产品,并销售至全球市场。。' },
  58. { id: 2, Cover: c2, title: '卷烟业务', desc: '我们的卷烟业务是从中国烟草旗下的卷烟生产企业采购卷烟产品,并销售至全球市场(中国内地除外)以及中国内地境内关外免税店。。' },
  59. { id: 3, Cover: c1, title: '新型烟草业务', desc: '我们的新型烟草业务是从中国烟草旗下的卷烟生产企业采购新型烟草制品,并独家销售至全球市场(中国内地除外)。' },
  60. ])
  61. // eslint-disable-next-line no-unused-vars
  62. const serviceList = ref([
  63. { id: 1, icon: 'am-icon-diamond', title: '多页面工作', desc: '标签栏可切换,不必为了新内容而被迫跳转界面,多项工作内容并行处理' },
  64. { id: 2, icon: 'am-icon-user', title: '多页面工作', desc: '标签栏可切换,不必为了新内容而被迫跳转界面,多项工作内容并行处理' },
  65. { id: 3, icon: 'am-icon-umbrella', title: '多页面工作', desc: '标签栏可切换,不必为了新内容而被迫跳转界面,多项工作内容并行处理' },
  66. { id: 4, icon: 'am-icon-briefcase', title: '多页面工作', desc: '标签栏可切换,不必为了新内容而被迫跳转界面,多项工作内容并行处理' },
  67. ]); const changeTab = (ind) => {
  68. tabIndex.value = ind
  69. // indexPhoto.value.style.opcity = '1'
  70. }
  71. const timer = ref(null)
  72. // eslint-disable-next-line no-unused-vars
  73. const swiper = () => {
  74. if (timer.value) {
  75. return
  76. }
  77. // eslint-disable-next-line no-unused-vars
  78. let looper = (a) => {
  79. if (tabIndex.value >= slideshow.value.length - 1) {
  80. tabIndex.value = -1
  81. }
  82. changeTab(tabIndex.value + 1)
  83. }
  84. timer.value = setInterval(looper, 3000)
  85. }
  86. const clearData = () => {
  87. if (timer.value) {
  88. clearInterval(timer.value);
  89. timer.value = null
  90. }
  91. }
  92. const card = ref('');
  93. // 当屏幕小于640px时,设置为vertical
  94. if (window.innerWidth < 640) {
  95. card.value = '';
  96. } else {
  97. card.value = 'card';
  98. }
  99. // 数字翻牌器
  100. import { useTransition } from '@vueuse/core'
  101. const source = ref(0)
  102. // eslint-disable-next-line no-unused-vars
  103. const outputValue = useTransition(source, {
  104. duration: 1500,
  105. })
  106. source.value = 24900;
  107. const source1 = ref(0)
  108. // eslint-disable-next-line no-unused-vars
  109. const outputValue1 = useTransition(source1, {
  110. duration: 1500,
  111. })
  112. source1.value = 87;
  113. const source2 = ref(0)
  114. // eslint-disable-next-line no-unused-vars
  115. const outputValue2 = useTransition(source2, {
  116. duration: 1500,
  117. })
  118. source2.value = 31;
  119. // eslint-disable-next-line no-unused-vars
  120. const formatter = (value) => {
  121. // 使用toFixed保留小数点后两位
  122. return `${value.toFixed(2)}`;
  123. }
  124. const source3 = ref(0)
  125. // eslint-disable-next-line no-unused-vars
  126. const outputValue3 = useTransition(source3, {
  127. duration: 1500,
  128. })
  129. source3.value = 0.97;
  130. // const videoPlayer = ref(null);
  131. // eslint-disable-next-line no-unused-vars
  132. // 获取新闻列表
  133. const newsListIndex = computed(() => messages.value[locale.value].message.newsListIndex)
  134. // 引用zh-CN里面的companyList数组
  135. // eslint-disable-next-line no-unused-vars
  136. const companyList = computed(() => messages.value[locale.value].message.companyList)
  137. const route = useRouter();
  138. // eslint-disable-next-line no-unused-vars
  139. const handleClick = (item) => {
  140. console.log('item', item);
  141. // 跳转到子公司详情页,使用路径参数传递
  142. route.push(`/subGroup/${item.id}`);
  143. console.log('点击了公司项:', item);
  144. }
  145. const handleGoNew = () => {
  146. // 跳转到新闻页面
  147. route.push('/news');
  148. }
  149. const goDetail = (id) => {
  150. route.push(`/newsDetail/${id}`);
  151. }
  152. // 移动端判断
  153. const isMobile = ref(false)
  154. // 检查是否为移动端
  155. const checkMobile = () => {
  156. isMobile.value = window.innerWidth <= 768
  157. }
  158. // 当语言是英文的时候,首页和路由都不要新闻列表了
  159. const showNews = computed(() => {
  160. return locale.value !== 'en'
  161. })
  162. onMounted(() => {
  163. // videoPlayer.value.play();
  164. // getSlideshow();
  165. // getAdvantage();
  166. // getService();
  167. // 初始化检查移动端
  168. checkMobile()
  169. // 初始化当前语言为 i18n 中的 locale(优先)
  170. currentLanguage.value = locale.value || getCurrentLanguage();
  171. // 订阅全局语言变更事件(使用 utils 封装)
  172. offLanguageListener.value = onLanguageChange((lang) => {
  173. currentLanguage.value = lang;
  174. console.log('IndexView detected language change:', lang);
  175. // 在这里可以执行语言切换后需要的额外逻辑(比如重新请求某些接口)
  176. });
  177. // 监听窗口大小变化
  178. window.addEventListener('resize', checkMobile)
  179. swiper();
  180. })
  181. onBeforeUnmount(() => {
  182. window.removeEventListener('resize', checkMobile)
  183. clearData();
  184. // 取消语言变更监听
  185. if (offLanguageListener.value) {
  186. offLanguageListener.value();
  187. offLanguageListener.value = null;
  188. }
  189. })
  190. </script>
  191. <template>
  192. <Layout>
  193. <div style="width: 100%">
  194. <div class="index-page">
  195. <!-- 使用Swiper替换原有的轮播 -->
  196. <Swiper
  197. :modules="modules" :slides-per-view="1" :space-between="0" :pagination="{ clickable: true }"
  198. :mousewheel="false" :allow-touch-move="true" :autoplay="{ delay: 3000, disableOnInteraction: false }"
  199. :loop="true" class="home-swiper" @swiper="onSwiper" @slide-change="onSlideChange">
  200. <SwiperSlide
  201. v-for="(slide, index) in slideshow" :key="index" class="swiper-slide-item" :style="{
  202. backgroundImage: `url(${slide.ImageUrl})`,
  203. backgroundRepeat: 'no-repeat',
  204. backgroundSize: 'cover',
  205. backgroundPosition: 'center'
  206. }">
  207. <div class="index-banner">
  208. <!-- 可以在这里添加轮播图上的内容 -->
  209. </div>
  210. </SwiperSlide>
  211. </Swiper>
  212. </div>
  213. </div>
  214. <div v-if="showNews" class="news-section">
  215. <div v-if="isMobile" class="newsTitle">{{ $t('message.t3') }}</div>
  216. <div>
  217. <Swiper
  218. :modules="modules" :slides-per-view="1" :space-between="0" :pagination="{ clickable: true }"
  219. :mousewheel="false" :allow-touch-move="true" :autoplay="{ delay: 3000, disableOnInteraction: false }"
  220. :loop="true" class="home-swiper" @swiper="onSwiper" @slide-change="onSlideChange">
  221. <SwiperSlide
  222. v-for="(slide, index) in newImg" :key="index" class="swiper-slide-item" :style="{
  223. backgroundImage: `url(${slide.ImageUrl})`,
  224. backgroundRepeat: 'no-repeat',
  225. backgroundSize: 'cover',
  226. backgroundPosition: 'center'
  227. }">
  228. <div class="index-banner">
  229. <!-- 可以在这里添加轮播图上的内容 -->
  230. </div>
  231. </SwiperSlide>
  232. </Swiper>
  233. </div>
  234. <div class="news-content">
  235. <div v-if="!isMobile" class="newsTitle">{{ $t('message.t3') }}</div>
  236. <div class="news-boxes">
  237. <div v-for="item in newsListIndex" :key="item.title" class="news-item" @click="goDetail(item.id)">
  238. <div class="news-item-title">{{ item.title }}</div>
  239. <div class="news-item-content">{{ item.content }}</div>
  240. <span class="news-item-date">{{ item.date }}</span>
  241. </div>
  242. </div>
  243. <div class="newsBtn" @click="handleGoNew">{{ $t('message.gengduoxinwen') }}</div>
  244. </div>
  245. </div>
  246. <div v-else>
  247. <div class="contactContainer1">
  248. <div class="contactContent">
  249. <div>{{ $t("message.ywjs") }}</div>
  250. <div class="fw" style=" text-indent: 2em;">{{ $t('message.ywjs2') }}</div>
  251. <div class="fw">{{ $t('message.ywjs3') }}</div>
  252. <div class="fw">{{ $t('message.ywjs4') }}</div>
  253. </div>
  254. <div class="contactContent">
  255. <div>{{ $t('message.ywzx') }}</div>
  256. <div class="cardContent">
  257. <div>
  258. <img src="../assets/images/call.png" alt="">
  259. <div>
  260. +852-26206011
  261. </div>
  262. <div>
  263. marketing@cti-group.com.hk
  264. </div>
  265. <div>
  266. <div>{{ $t('message.ywzx2') }}</div>
  267. </div>
  268. </div>
  269. <div>
  270. <img src="../assets/images/call.png" alt="">
  271. <div>
  272. +852-26206308
  273. </div>
  274. <div>
  275. supplychain@cti-group.com.hk
  276. </div>
  277. <div>
  278. <div>{{ $t('message.ywzx1') }}</div>
  279. </div>
  280. </div>
  281. <div>
  282. <img src="../assets/images/call.png" alt="">
  283. <div>
  284. +852-26206055
  285. </div>
  286. <div>
  287. production@cti-group.com.hk
  288. </div>
  289. <div>
  290. <div>{{ $t('message.ywzx3') }}</div>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. <!-- <div class="group-section">
  298. <div class="group-title">{{ $t('message.suoshuqiye') }}</div>
  299. <div class="group-line"></div>
  300. <div class="group-list">
  301. <div v-for="(item, index) in companyList" class="group-item" :key="index" @click="handleClick(item)">
  302. <div>{{ item.name }}</div>
  303. <div></div>
  304. <img src="../assets/images/newIndex/svg.png" alt="">
  305. </div>
  306. </div>
  307. </div> -->
  308. </Layout>
  309. </template>
  310. <style lang="scss" scoped>
  311. // Swiper轮播图样式
  312. .home-swiper {
  313. width: 100%;
  314. // height: 700px;
  315. // @media screen and (min-width: 768px) {
  316. // height: 500px;
  317. // }
  318. // @media screen and (min-width: 1024px) {
  319. // height: 600px;
  320. // }
  321. // 轮播项样式
  322. .swiper-slide-item {
  323. width: 100%;
  324. height: 100%;
  325. display: flex;
  326. align-items: center;
  327. justify-content: center;
  328. position: relative;
  329. }
  330. // 分页器样式
  331. :deep(.swiper-pagination) {
  332. bottom: 20px !important;
  333. .swiper-pagination-bullet {
  334. background: rgba(255, 255, 255, 0.9);
  335. opacity: 1;
  336. width: 0.6rem;
  337. height: 0.6rem;
  338. margin: 0 0.4rem;
  339. transition: all 0.3s ease;
  340. &.swiper-pagination-bullet-active {
  341. background: #F7B334;
  342. width: 1.5rem;
  343. /* 激活状态下的横线更长 */
  344. height: 0.6rem;
  345. transform: scale(1.1);
  346. border-radius: 3px;
  347. }
  348. }
  349. }
  350. }
  351. // 公司介绍部分响应式
  352. .section {
  353. padding: 40px 0;
  354. @media screen and (min-width: 768px) {
  355. padding: 60px 0;
  356. }
  357. @media screen and (min-width: 1024px) {
  358. padding: 80px 0;
  359. }
  360. .section--header {
  361. .section--title {
  362. font-size: 2rem;
  363. font-weight: 300;
  364. text-align: center;
  365. margin-bottom: 1rem;
  366. @media screen and (min-width: 768px) {
  367. font-size: 2.5rem;
  368. }
  369. @media screen and (min-width: 1024px) {
  370. font-size: 3rem;
  371. }
  372. }
  373. .english-title {
  374. font-size: 1.5rem;
  375. color: #007557;
  376. text-align: center;
  377. font-weight: bold;
  378. @media screen and (min-width: 768px) {
  379. font-size: 2rem;
  380. }
  381. @media screen and (min-width: 1024px) {
  382. font-size: 2.5rem;
  383. }
  384. }
  385. .english-title1 {
  386. font-size: 1rem;
  387. color: #007557;
  388. text-align: center;
  389. margin-bottom: 2rem;
  390. @media screen and (min-width: 768px) {
  391. font-size: 1.2rem;
  392. }
  393. @media screen and (min-width: 1024px) {
  394. font-size: 1.5rem;
  395. }
  396. }
  397. }
  398. .container1 {
  399. display: flex;
  400. align-items: center;
  401. gap: 2rem;
  402. @media screen and (max-width: 767px) {
  403. flex-direction: column;
  404. gap: 1rem;
  405. }
  406. .boxs {
  407. width: 100%;
  408. position: relative;
  409. top: -20px;
  410. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  411. padding: 10px;
  412. background: white;
  413. border-radius: 8px;
  414. @media screen and (min-width: 768px) {
  415. width: 40%;
  416. }
  417. @media screen and (max-width: 767px) {
  418. top: 0;
  419. order: 2;
  420. }
  421. }
  422. .section--description-index {
  423. width: 100%;
  424. font-size: 1rem;
  425. line-height: 1.6;
  426. color: #9b9b9b;
  427. text-align: left;
  428. margin: 0;
  429. @media screen and (min-width: 768px) {
  430. width: 60%;
  431. font-size: 1.1rem;
  432. }
  433. @media screen and (min-width: 1024px) {
  434. width: 54%;
  435. font-size: 1.2rem;
  436. }
  437. @media screen and (max-width: 767px) {
  438. order: 1;
  439. text-align: center;
  440. }
  441. .moremore {
  442. color: #007557;
  443. cursor: pointer;
  444. margin-top: 1rem;
  445. font-weight: bold;
  446. &:hover {
  447. text-decoration: underline;
  448. }
  449. }
  450. }
  451. }
  452. }
  453. // 数字统计部分响应式
  454. .numberBox {
  455. display: flex;
  456. justify-content: space-around;
  457. margin-top: 2rem;
  458. flex-wrap: wrap;
  459. gap: 1rem;
  460. @media screen and (max-width: 767px) {
  461. flex-direction: column;
  462. align-items: center;
  463. }
  464. .number-item {
  465. text-align: center;
  466. flex: 1;
  467. min-width: 200px;
  468. @media screen and (max-width: 767px) {
  469. min-width: auto;
  470. width: 100%;
  471. }
  472. .number-value {
  473. display: flex;
  474. justify-content: center;
  475. align-items: center;
  476. gap: 0.5rem;
  477. }
  478. .number-label {
  479. font-size: 0.9rem;
  480. margin-top: 0.5rem;
  481. color: #666;
  482. @media screen and (min-width: 768px) {
  483. font-size: 1rem;
  484. }
  485. @media screen and (min-width: 1024px) {
  486. font-size: 1.1rem;
  487. }
  488. }
  489. .unit {
  490. font-size: 0.8rem;
  491. @media screen and (min-width: 768px) {
  492. font-size: 0.9rem;
  493. }
  494. @media screen and (min-width: 1024px) {
  495. font-size: 1rem;
  496. }
  497. }
  498. &:nth-child(1),
  499. &:nth-child(4) {
  500. .el-statistic__number {
  501. color: #c9082c;
  502. font-weight: bold;
  503. font-size: 1.5rem;
  504. @media screen and (min-width: 768px) {
  505. font-size: 1.8rem;
  506. }
  507. @media screen and (min-width: 1024px) {
  508. font-size: 2rem;
  509. }
  510. }
  511. }
  512. &:nth-child(2),
  513. &:nth-child(3) {
  514. .el-statistic__number {
  515. color: #006953;
  516. font-weight: bold;
  517. font-size: 1.5rem;
  518. @media screen and (min-width: 768px) {
  519. font-size: 1.8rem;
  520. }
  521. @media screen and (min-width: 1024px) {
  522. font-size: 2rem;
  523. }
  524. }
  525. }
  526. }
  527. }
  528. // 业务介绍部分响应式
  529. .index-container {
  530. .avdlayout {
  531. margin-top: 3rem;
  532. }
  533. .am-g {
  534. display: flex;
  535. flex-wrap: wrap;
  536. gap: 2rem;
  537. @media screen and (max-width: 767px) {
  538. flex-direction: column;
  539. gap: 1.5rem;
  540. }
  541. }
  542. .am-u-md-31 {
  543. flex: 1;
  544. min-width: 300px;
  545. @media screen and (max-width: 767px) {
  546. min-width: auto;
  547. }
  548. }
  549. .features_item {
  550. text-align: center;
  551. padding: 1.5rem;
  552. background: white;
  553. border-radius: 8px;
  554. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  555. transition: transform 0.3s ease;
  556. &:hover {
  557. transform: translateY(-5px);
  558. }
  559. .imgg {
  560. width: 100%;
  561. height: 200px;
  562. border-radius: 8px;
  563. margin-bottom: 1rem;
  564. @media screen and (max-width: 767px) {
  565. height: 150px;
  566. }
  567. }
  568. .features_item--title {
  569. font-size: 1.2rem;
  570. font-weight: bold;
  571. color: #333;
  572. margin-bottom: 1rem;
  573. @media screen and (min-width: 768px) {
  574. font-size: 1.4rem;
  575. }
  576. @media screen and (min-width: 1024px) {
  577. font-size: 1.6rem;
  578. }
  579. }
  580. .features_item--text {
  581. font-size: 0.9rem;
  582. line-height: 1.6;
  583. color: #666;
  584. @media screen and (min-width: 768px) {
  585. font-size: 1rem;
  586. }
  587. @media screen and (min-width: 1024px) {
  588. font-size: 1.1rem;
  589. }
  590. }
  591. }
  592. }
  593. // 新闻部分响应式
  594. .news-section {
  595. padding-top: 0;
  596. width: 70%;
  597. display: flex;
  598. justify-content: space-between;
  599. height: 37rem;
  600. margin-top: 6rem;
  601. flex: 1;
  602. @media screen and (min-width: 1024px) {
  603. width: 70%;
  604. display: flex;
  605. flex: 1;
  606. margin-top: 6rem;
  607. height: 37rem !important;
  608. /* 增加 !important 确保优先级 */
  609. max-height: 37rem;
  610. /* 限制最大高度 */
  611. }
  612. @media screen and (max-width: 767px) {
  613. width: 100%;
  614. flex-direction: column;
  615. margin-top: 0;
  616. }
  617. >div {
  618. @media screen and (min-width: 1024px) {
  619. width: 50%;
  620. }
  621. .newsTitle {
  622. font-size: 1.6rem;
  623. font-weight: 700;
  624. border-bottom: 0.2rem solid #F7B334;
  625. padding-bottom: 0.9rem;
  626. width: 46%;
  627. @media screen and (min-width: 1024px) {
  628. font-size: 1.6rem;
  629. font-weight: 700;
  630. border-bottom: 0.2rem solid #F7B334;
  631. padding-bottom: 0.9rem;
  632. width: 46%;
  633. }
  634. }
  635. }
  636. >div:nth-child(1) {
  637. width: 57%;
  638. @media screen and (min-width: 1024px) {
  639. width: 57%;
  640. }
  641. @media screen and (max-width: 767px) {
  642. width: 80%;
  643. padding: 1.5rem 1rem;
  644. margin: 0rem auto 2rem;
  645. font-size: 2.2rem;
  646. border-bottom: 0.3rem solid #F7B334;
  647. font-weight: 700;
  648. }
  649. }
  650. >div:nth-child(2) {
  651. width: 38%;
  652. @media screen and (min-width: 1024px) {
  653. width: 38%;
  654. }
  655. @media screen and (max-width: 767px) {
  656. width: 80%;
  657. margin: 0rem auto;
  658. }
  659. }
  660. >div:nth-child(3) {
  661. @media screen and (max-width: 767px) {
  662. width: 100%;
  663. margin: 1rem auto;
  664. }
  665. }
  666. .news-content {
  667. display: flex;
  668. flex-direction: column;
  669. // 上下两端对齐
  670. justify-content: space-between;
  671. margin-left: 3rem;
  672. margin-top: -3.4rem;
  673. @media screen and (min-width: 1024px) {
  674. margin-left: 3rem;
  675. margin-top: -3.4rem;
  676. }
  677. }
  678. .news-boxes {
  679. @media screen and (min-width: 1024px) {
  680. // display: flex;
  681. // flex-wrap: wrap;
  682. }
  683. @media screen and (max-width: 767px) {
  684. width: 90%;
  685. margin: 1rem auto;
  686. >div:nth-child(1) {
  687. margin-top: 0;
  688. }
  689. }
  690. // >div:nth-child(even) {
  691. // @media screen and (min-width: 1024px) {
  692. // margin-left: 5%;
  693. // }
  694. // }
  695. // >div:nth-child(1),>div:nth-child(2) {
  696. // @media screen and (min-width: 1024px) {
  697. // margin-top: 0;
  698. // }
  699. // }
  700. }
  701. .news-item {
  702. color: #666666;
  703. cursor: pointer;
  704. position: relative;
  705. width: 100%;
  706. // padding-bottom: 0.9rem;
  707. border-bottom: 1px solid #e9e9e9;
  708. margin-top: 1rem;
  709. font-size: 1.6rem;
  710. @media screen and (min-width: 1024px) {
  711. position: relative;
  712. width: 100%;
  713. // padding-bottom: 0.9rem;
  714. border-bottom: 1px solid #e9e9e9;
  715. margin-top: 1rem;
  716. font-size: 1.6rem;
  717. }
  718. @media screen and (max-width: 767px) {
  719. width: 100%;
  720. border-bottom: 1px solid #e9e9e9;
  721. margin-top: 1.5rem;
  722. font-size: 1.4rem;
  723. padding: 0rem 0rem 1rem;
  724. }
  725. }
  726. .news-item-title {
  727. color: #555;
  728. font-size: 1.1rem;
  729. line-height: 1.3;
  730. height: 3.3rem;
  731. @media screen and (max-width: 767px) {
  732. font-size: 1.6rem;
  733. height: 4.8rem;
  734. }
  735. }
  736. .news-item-content {
  737. font-size: 0.9rem;
  738. // margin: 10px 0px 5px 0px;
  739. // 只显示3行剩下用...代替
  740. display: -webkit-box;
  741. -webkit-line-clamp: 2;
  742. line-clamp: 2;
  743. -webkit-box-orient: vertical;
  744. overflow: hidden;
  745. text-overflow: ellipsis;
  746. line-height: 1.4;
  747. max-height: 4.2em;
  748. /* 3行 × 1.4行高 = 4.2em */
  749. @media screen and (max-width: 767px) {
  750. font-size: 1.3rem;
  751. }
  752. }
  753. .news-item-date {
  754. font-size: 1rem;
  755. color: #999;
  756. @media screen and (min-width: 1024px) {
  757. font-size: 1rem;
  758. color: #999;
  759. }
  760. @media screen and (max-width: 767px) {
  761. font-size: 1.2rem;
  762. color: #999;
  763. margin-top: 0.5rem;
  764. }
  765. }
  766. .newsBtn {
  767. padding: 0.6rem 0rem;
  768. background-color: #F7B334;
  769. color: white;
  770. font-size: 1.1rem;
  771. text-align: center;
  772. width: 10rem;
  773. margin-top: 1rem;
  774. @media screen and (min-width: 1024px) {
  775. padding: 0.6rem 0rem;
  776. background-color: #F7B334;
  777. color: white;
  778. font-size: 1.1rem;
  779. text-align: center;
  780. width: 10rem;
  781. margin-top: 1rem;
  782. }
  783. @media screen and (max-width: 767px) {
  784. padding: 0.6rem 0rem;
  785. background-color: #F7B334;
  786. color: white;
  787. font-size: 1.2rem;
  788. text-align: center;
  789. width: 10rem;
  790. margin: 1rem auto;
  791. }
  792. }
  793. }
  794. .group-section {
  795. width: 70%;
  796. @media screen and (max-width: 767px) {
  797. width: 90%;
  798. display: flex;
  799. flex-direction: column;
  800. // margin:0 auto;
  801. }
  802. }
  803. .group-title {
  804. font-size: 2rem;
  805. font-weight: bold;
  806. text-align: center;
  807. margin-top: 4rem;
  808. @media screen and (min-width: 1024px) {
  809. font-size: 2rem;
  810. font-weight: bold;
  811. text-align: center;
  812. margin-top: 4rem;
  813. }
  814. @media screen and (max-width: 767px) {
  815. font-size: 1.8rem;
  816. font-weight: bold;
  817. text-align: center;
  818. margin-top: 1rem;
  819. }
  820. }
  821. .group-line {
  822. width: 6%;
  823. border-bottom: 0.3rem solid #F7B334;
  824. margin: 1.4rem auto;
  825. }
  826. .group-list {
  827. margin-top: 0.8rem;
  828. display: flex;
  829. flex-wrap: wrap;
  830. justify-content: flex-start;
  831. /* 改为从左开始排列 */
  832. text-align: center;
  833. gap: 1.5rem;
  834. /* 减小间距以适应更多元素 */
  835. @media screen and (min-width: 768px) and (max-width: 1024px) {
  836. margin-top: 0.8rem;
  837. display: flex;
  838. flex-wrap: wrap;
  839. justify-content: flex-start;
  840. /* 桌面端也从左开始排列 */
  841. text-align: center;
  842. gap: 2.2rem;
  843. /* 桌面端减小间距 */
  844. }
  845. @media screen and (min-width: 1024px) {
  846. margin-top: 0.8rem;
  847. display: flex;
  848. flex-wrap: wrap;
  849. justify-content: flex-start;
  850. /* 桌面端也从左开始排列 */
  851. text-align: center;
  852. gap: 1.4rem;
  853. /* 桌面端减小间距 */
  854. }
  855. @media screen and (max-width: 768px) {
  856. margin-top: 0.8rem;
  857. display: flex;
  858. flex-wrap: wrap;
  859. justify-content: flex-start;
  860. /* 桌面端也从左开始排列 */
  861. text-align: center;
  862. gap: 0rem;
  863. /* 桌面端减小间距 */
  864. }
  865. }
  866. .group-item {
  867. width: calc(18% - 0.4rem);
  868. /* 桌面端每行5个,更精确的计算 */
  869. padding: 0.5rem 0.3rem;
  870. /* 减小内边距以适应更多元素 */
  871. border: 1px solid #e9e9e9;
  872. border-radius: 8px;
  873. background-color: white;
  874. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  875. color: #F7B334;
  876. font-size: 1.1rem;
  877. cursor: pointer;
  878. transition: transform 0.2s ease;
  879. &:hover {
  880. transform: translateY(-2px);
  881. box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  882. }
  883. @media screen and (max-width: 767px) {
  884. // width: calc(30% - 0.5rem); /* 移动端每行3个 */
  885. padding: 0.65rem 0.4rem;
  886. border: 1px solid #e9e9e9;
  887. border-radius: 8px;
  888. background-color: white;
  889. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  890. color: #F7B334;
  891. font-size: 1.2rem;
  892. margin: 0.5rem;
  893. width: 45%;
  894. }
  895. @media screen and (min-width: 768px) and (max-width: 1024px) {
  896. width: calc(28% - 0.6rem);
  897. padding: 0.6rem 0.35rem;
  898. font-size: 1.0rem;
  899. margin: 1rem;
  900. }
  901. >div:nth-child(1) {
  902. margin-top: 1.3rem;
  903. font-size: 1.2rem;
  904. // font-weight: 550;
  905. border-bottom: 3px;
  906. @media screen and (min-width: 1024px) {
  907. margin-top: 1.3rem;
  908. font-size: 1.2rem;
  909. // font-weight: 550;
  910. border-bottom: 3px;
  911. }
  912. }
  913. >div:nth-child(2) {
  914. border: 1px solid #F7B334;
  915. width: 80%;
  916. margin: 0.5rem auto;
  917. }
  918. >img {
  919. width: 1.5rem;
  920. height: 1.5rem;
  921. margin-top: 0.3rem;
  922. }
  923. // }
  924. }
  925. // 响应式图片
  926. .responsive-img {
  927. max-width: 100%;
  928. height: auto;
  929. display: block;
  930. }
  931. // 高亮效果
  932. .highlight:hover {
  933. background: RGB(156, 214, 231);
  934. }
  935. .bgchover:hover {
  936. background: RGB(156, 214, 231);
  937. }
  938. // Swiper样式
  939. .swiper {
  940. width: 100%;
  941. height: 44.7rem;
  942. @media screen and (max-width: 767px) {
  943. height: 34rem;
  944. }
  945. }
  946. .news-section {
  947. .swiper {
  948. width: 100%;
  949. height: 30rem;
  950. @media screen and (max-width: 767px) {
  951. height: 25rem;
  952. }
  953. }
  954. }
  955. .swiper-slide {
  956. position: relative;
  957. background-color: #fafafa;
  958. width: 100%;
  959. }
  960. .age-modal {
  961. position: fixed;
  962. z-index: 99999;
  963. left: 0;
  964. top: 0;
  965. right: 0;
  966. bottom: 0;
  967. background: rgba(0, 0, 0, 0.55);
  968. display: flex;
  969. align-items: center;
  970. justify-content: center;
  971. }
  972. .age-modal-content {
  973. background: #fff;
  974. border-radius: 12px;
  975. box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18);
  976. padding: 2.5rem 2rem 2rem;
  977. max-width: 350px;
  978. width: 90%;
  979. text-align: center;
  980. }
  981. .age-modal-title {
  982. font-size: 1.3rem;
  983. font-weight: bold;
  984. margin-bottom: 1.2rem;
  985. color: #c9082c;
  986. }
  987. .age-modal-desc {
  988. font-size: 1.05rem;
  989. margin-bottom: 2rem;
  990. color: #333;
  991. }
  992. .age-modal-actions {
  993. display: flex;
  994. justify-content: space-between;
  995. gap: 1.2rem;
  996. }
  997. .age-btn {
  998. flex: 1;
  999. padding: 0.7rem 0.2rem;
  1000. border-radius: 6px;
  1001. border: none;
  1002. font-size: 1rem;
  1003. cursor: pointer;
  1004. font-weight: bold;
  1005. transition: background 0.2s;
  1006. }
  1007. .age-btn.deny {
  1008. background: #eee;
  1009. color: #c9082c;
  1010. }
  1011. .age-btn.confirm {
  1012. background: #F7B334;
  1013. color: #fff;
  1014. }
  1015. .age-btn:hover {
  1016. opacity: 0.85;
  1017. }
  1018. .contactContainer1 {
  1019. width: 100%;
  1020. height: 100%;
  1021. background-color: #f7f7f7;
  1022. padding-bottom: 5rem;
  1023. }
  1024. .contact {
  1025. width: 100%;
  1026. }
  1027. .fw {
  1028. // font-weight: 550;
  1029. color: #444;
  1030. margin-top: 2rem;
  1031. }
  1032. .bgImg {
  1033. width: 100%;
  1034. >img {
  1035. width: 100%;
  1036. height: 100%;
  1037. }
  1038. }
  1039. .contactContent {
  1040. width: 65%;
  1041. margin: 0px auto 20px;
  1042. font-size: 1.3rem;
  1043. padding-top: 3rem;
  1044. >div:nth-child(1) {
  1045. font-size: 1.5rem;
  1046. color: #F7B334;
  1047. font-weight: bold;
  1048. margin-bottom: 1.7rem;
  1049. }
  1050. }
  1051. .cardContent {
  1052. display: flex;
  1053. justify-content: space-between;
  1054. >div {
  1055. width: 30%;
  1056. // height: 15rem;
  1057. background: #fff;
  1058. padding: 1rem;
  1059. text-align: center;
  1060. font-size: 1.6rem;
  1061. font-weight: 550;
  1062. color: #444;
  1063. >img {
  1064. width: 3rem;
  1065. height: 3rem;
  1066. margin: 2rem 0rem 0rem 0rem
  1067. }
  1068. >div:nth-child(2) {
  1069. font-size: 2.2rem;
  1070. color: #F7B334;
  1071. }
  1072. >div:nth-child(3),
  1073. >div:nth-child(4) {
  1074. font-size: 0.9rem;
  1075. color: #333;
  1076. margin-top: 0.5rem;
  1077. }
  1078. }
  1079. @media screen and (max-width: 767px) {
  1080. width: 100%;
  1081. display: block;
  1082. >div {
  1083. padding: 0rem;
  1084. width: 100%;
  1085. margin-bottom: 2rem;
  1086. padding-bottom: 2rem;
  1087. padding-top: 1rem;
  1088. }
  1089. }
  1090. }
  1091. </style>