IndexView.vue 26 KB

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