IndexView.vue 26 KB

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