IndexView.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259
  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">{{ $t('message.ywjs1') }}</div>
  263. </div>
  264. <div class="contactContent">
  265. <div>{{ $t('message.ywzx') }}</div>
  266. <div class="cardContent">
  267. <div>
  268. <img src="../assets/images/call.png" alt="">
  269. <div>
  270. +852XXXXXXXX
  271. </div>
  272. <div>
  273. xxxx@xxx.com
  274. </div>
  275. <div>
  276. <div>{{ $t('message.ywzx2') }}</div>
  277. </div>
  278. </div>
  279. <div>
  280. <img src="../assets/images/call.png" alt="">
  281. <div>
  282. +852XXXXXXXX
  283. </div>
  284. <div>
  285. xxxx@xxx.com
  286. </div>
  287. <div>
  288. <div>{{ $t('message.ywzx1') }}</div>
  289. </div>
  290. </div>
  291. <div>
  292. <img src="../assets/images/call.png" alt="">
  293. <div>
  294. +852-26206055
  295. </div>
  296. <div>
  297. {{ yangyEmail }}
  298. </div>
  299. <div>
  300. <div>{{ $t('message.ywzx3') }}</div>
  301. </div>
  302. </div>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. <div class="group-section">
  308. <div class="group-title">{{ $t('message.suoshuqiye') }}</div>
  309. <div class="group-line"></div>
  310. <div class="group-list">
  311. <div v-for="(item, index) in companyList" class="group-item" :key="index" @click="handleClick(item)">
  312. <div>{{ item.name }}</div>
  313. <div></div>
  314. <!-- <div>{{ item.nameEnglish }}</div> -->
  315. <img src="../assets/images/newIndex/svg.png" alt="">
  316. </div>
  317. </div>
  318. </div>
  319. </Layout>
  320. </template>
  321. <style lang="scss" scoped>
  322. // Swiper轮播图样式
  323. .home-swiper {
  324. width: 100%;
  325. // height: 700px;
  326. // @media screen and (min-width: 768px) {
  327. // height: 500px;
  328. // }
  329. // @media screen and (min-width: 1024px) {
  330. // height: 600px;
  331. // }
  332. // 轮播项样式
  333. .swiper-slide-item {
  334. width: 100%;
  335. height: 100%;
  336. display: flex;
  337. align-items: center;
  338. justify-content: center;
  339. position: relative;
  340. }
  341. // 分页器样式
  342. :deep(.swiper-pagination) {
  343. bottom: 20px !important;
  344. .swiper-pagination-bullet {
  345. background: rgba(255, 255, 255, 0.9);
  346. opacity: 1;
  347. width: 0.6rem;
  348. height: 0.6rem;
  349. margin: 0 0.4rem;
  350. transition: all 0.3s ease;
  351. &.swiper-pagination-bullet-active {
  352. background: #F7B334;
  353. width: 1.5rem;
  354. /* 激活状态下的横线更长 */
  355. height: 0.6rem;
  356. transform: scale(1.1);
  357. border-radius: 3px;
  358. }
  359. }
  360. }
  361. }
  362. // 公司介绍部分响应式
  363. .section {
  364. padding: 40px 0;
  365. @media screen and (min-width: 768px) {
  366. padding: 60px 0;
  367. }
  368. @media screen and (min-width: 1024px) {
  369. padding: 80px 0;
  370. }
  371. .section--header {
  372. .section--title {
  373. font-size: 2rem;
  374. font-weight: 300;
  375. text-align: center;
  376. margin-bottom: 1rem;
  377. @media screen and (min-width: 768px) {
  378. font-size: 2.5rem;
  379. }
  380. @media screen and (min-width: 1024px) {
  381. font-size: 3rem;
  382. }
  383. }
  384. .english-title {
  385. font-size: 1.5rem;
  386. color: #007557;
  387. text-align: center;
  388. font-weight: bold;
  389. @media screen and (min-width: 768px) {
  390. font-size: 2rem;
  391. }
  392. @media screen and (min-width: 1024px) {
  393. font-size: 2.5rem;
  394. }
  395. }
  396. .english-title1 {
  397. font-size: 1rem;
  398. color: #007557;
  399. text-align: center;
  400. margin-bottom: 2rem;
  401. @media screen and (min-width: 768px) {
  402. font-size: 1.2rem;
  403. }
  404. @media screen and (min-width: 1024px) {
  405. font-size: 1.5rem;
  406. }
  407. }
  408. }
  409. .container1 {
  410. display: flex;
  411. align-items: center;
  412. gap: 2rem;
  413. @media screen and (max-width: 767px) {
  414. flex-direction: column;
  415. gap: 1rem;
  416. }
  417. .boxs {
  418. width: 100%;
  419. position: relative;
  420. top: -20px;
  421. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  422. padding: 10px;
  423. background: white;
  424. border-radius: 8px;
  425. @media screen and (min-width: 768px) {
  426. width: 40%;
  427. }
  428. @media screen and (max-width: 767px) {
  429. top: 0;
  430. order: 2;
  431. }
  432. }
  433. .section--description-index {
  434. width: 100%;
  435. font-size: 1rem;
  436. line-height: 1.6;
  437. color: #9b9b9b;
  438. text-align: left;
  439. margin: 0;
  440. @media screen and (min-width: 768px) {
  441. width: 60%;
  442. font-size: 1.1rem;
  443. }
  444. @media screen and (min-width: 1024px) {
  445. width: 54%;
  446. font-size: 1.2rem;
  447. }
  448. @media screen and (max-width: 767px) {
  449. order: 1;
  450. text-align: center;
  451. }
  452. .moremore {
  453. color: #007557;
  454. cursor: pointer;
  455. margin-top: 1rem;
  456. font-weight: bold;
  457. &:hover {
  458. text-decoration: underline;
  459. }
  460. }
  461. }
  462. }
  463. }
  464. // 数字统计部分响应式
  465. .numberBox {
  466. display: flex;
  467. justify-content: space-around;
  468. margin-top: 2rem;
  469. flex-wrap: wrap;
  470. gap: 1rem;
  471. @media screen and (max-width: 767px) {
  472. flex-direction: column;
  473. align-items: center;
  474. }
  475. .number-item {
  476. text-align: center;
  477. flex: 1;
  478. min-width: 200px;
  479. @media screen and (max-width: 767px) {
  480. min-width: auto;
  481. width: 100%;
  482. }
  483. .number-value {
  484. display: flex;
  485. justify-content: center;
  486. align-items: center;
  487. gap: 0.5rem;
  488. }
  489. .number-label {
  490. font-size: 0.9rem;
  491. margin-top: 0.5rem;
  492. color: #666;
  493. @media screen and (min-width: 768px) {
  494. font-size: 1rem;
  495. }
  496. @media screen and (min-width: 1024px) {
  497. font-size: 1.1rem;
  498. }
  499. }
  500. .unit {
  501. font-size: 0.8rem;
  502. @media screen and (min-width: 768px) {
  503. font-size: 0.9rem;
  504. }
  505. @media screen and (min-width: 1024px) {
  506. font-size: 1rem;
  507. }
  508. }
  509. &:nth-child(1),
  510. &:nth-child(4) {
  511. .el-statistic__number {
  512. color: #c9082c;
  513. font-weight: bold;
  514. font-size: 1.5rem;
  515. @media screen and (min-width: 768px) {
  516. font-size: 1.8rem;
  517. }
  518. @media screen and (min-width: 1024px) {
  519. font-size: 2rem;
  520. }
  521. }
  522. }
  523. &:nth-child(2),
  524. &:nth-child(3) {
  525. .el-statistic__number {
  526. color: #006953;
  527. font-weight: bold;
  528. font-size: 1.5rem;
  529. @media screen and (min-width: 768px) {
  530. font-size: 1.8rem;
  531. }
  532. @media screen and (min-width: 1024px) {
  533. font-size: 2rem;
  534. }
  535. }
  536. }
  537. }
  538. }
  539. // 业务介绍部分响应式
  540. .index-container {
  541. .avdlayout {
  542. margin-top: 3rem;
  543. }
  544. .am-g {
  545. display: flex;
  546. flex-wrap: wrap;
  547. gap: 2rem;
  548. @media screen and (max-width: 767px) {
  549. flex-direction: column;
  550. gap: 1.5rem;
  551. }
  552. }
  553. .am-u-md-31 {
  554. flex: 1;
  555. min-width: 300px;
  556. @media screen and (max-width: 767px) {
  557. min-width: auto;
  558. }
  559. }
  560. .features_item {
  561. text-align: center;
  562. padding: 1.5rem;
  563. background: white;
  564. border-radius: 8px;
  565. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  566. transition: transform 0.3s ease;
  567. &:hover {
  568. transform: translateY(-5px);
  569. }
  570. .imgg {
  571. width: 100%;
  572. height: 200px;
  573. border-radius: 8px;
  574. margin-bottom: 1rem;
  575. @media screen and (max-width: 767px) {
  576. height: 150px;
  577. }
  578. }
  579. .features_item--title {
  580. font-size: 1.2rem;
  581. font-weight: bold;
  582. color: #333;
  583. margin-bottom: 1rem;
  584. @media screen and (min-width: 768px) {
  585. font-size: 1.4rem;
  586. }
  587. @media screen and (min-width: 1024px) {
  588. font-size: 1.6rem;
  589. }
  590. }
  591. .features_item--text {
  592. font-size: 0.9rem;
  593. line-height: 1.6;
  594. color: #666;
  595. @media screen and (min-width: 768px) {
  596. font-size: 1rem;
  597. }
  598. @media screen and (min-width: 1024px) {
  599. font-size: 1.1rem;
  600. }
  601. }
  602. }
  603. }
  604. // 新闻部分响应式
  605. .news-section {
  606. padding-top: 0;
  607. width: 70%;
  608. display: flex;
  609. justify-content: space-between;
  610. height: 37rem;
  611. margin-top: 6rem;
  612. flex: 1;
  613. @media screen and (min-width: 1024px) {
  614. width: 70%;
  615. display: flex;
  616. flex: 1;
  617. margin-top: 6rem;
  618. height: 37rem !important;
  619. /* 增加 !important 确保优先级 */
  620. max-height: 37rem;
  621. /* 限制最大高度 */
  622. }
  623. @media screen and (max-width: 767px) {
  624. width: 100%;
  625. flex-direction: column;
  626. margin-top: 0;
  627. }
  628. >div {
  629. @media screen and (min-width: 1024px) {
  630. width: 50%;
  631. }
  632. .newsTitle {
  633. font-size: 1.6rem;
  634. font-weight: 700;
  635. border-bottom: 0.2rem solid #F7B334;
  636. padding-bottom: 0.9rem;
  637. width: 46%;
  638. @media screen and (min-width: 1024px) {
  639. font-size: 1.6rem;
  640. font-weight: 700;
  641. border-bottom: 0.2rem solid #F7B334;
  642. padding-bottom: 0.9rem;
  643. width: 46%;
  644. }
  645. }
  646. }
  647. >div:nth-child(1) {
  648. width: 57%;
  649. @media screen and (min-width: 1024px) {
  650. width: 57%;
  651. }
  652. @media screen and (max-width: 767px) {
  653. width: 80%;
  654. padding: 1.5rem 1rem;
  655. margin: 0rem auto 2rem;
  656. font-size: 2.2rem;
  657. border-bottom: 0.3rem solid #F7B334;
  658. font-weight: 700;
  659. }
  660. }
  661. >div:nth-child(2) {
  662. width: 38%;
  663. @media screen and (min-width: 1024px) {
  664. width: 38%;
  665. }
  666. @media screen and (max-width: 767px) {
  667. width: 80%;
  668. margin: 0rem auto;
  669. }
  670. }
  671. >div:nth-child(3) {
  672. @media screen and (max-width: 767px) {
  673. width: 100%;
  674. margin: 1rem auto;
  675. }
  676. }
  677. .news-content {
  678. display: flex;
  679. flex-direction: column;
  680. // 上下两端对齐
  681. justify-content: space-between;
  682. margin-left: 3rem;
  683. margin-top: -3.4rem;
  684. @media screen and (min-width: 1024px) {
  685. margin-left: 3rem;
  686. margin-top: -3.4rem;
  687. }
  688. }
  689. .news-boxes {
  690. @media screen and (min-width: 1024px) {
  691. // display: flex;
  692. // flex-wrap: wrap;
  693. }
  694. @media screen and (max-width: 767px) {
  695. width: 90%;
  696. margin: 1rem auto;
  697. >div:nth-child(1) {
  698. margin-top: 0;
  699. }
  700. }
  701. // >div:nth-child(even) {
  702. // @media screen and (min-width: 1024px) {
  703. // margin-left: 5%;
  704. // }
  705. // }
  706. // >div:nth-child(1),>div:nth-child(2) {
  707. // @media screen and (min-width: 1024px) {
  708. // margin-top: 0;
  709. // }
  710. // }
  711. }
  712. .news-item {
  713. color: #666666;
  714. cursor: pointer;
  715. position: relative;
  716. width: 100%;
  717. // padding-bottom: 0.9rem;
  718. border-bottom: 1px solid #e9e9e9;
  719. margin-top: 1rem;
  720. font-size: 1.6rem;
  721. @media screen and (min-width: 1024px) {
  722. position: relative;
  723. width: 100%;
  724. // padding-bottom: 0.9rem;
  725. border-bottom: 1px solid #e9e9e9;
  726. margin-top: 1rem;
  727. font-size: 1.6rem;
  728. }
  729. @media screen and (max-width: 767px) {
  730. width: 100%;
  731. border-bottom: 1px solid #e9e9e9;
  732. margin-top: 1.5rem;
  733. font-size: 1.4rem;
  734. padding: 0rem 0rem 1rem;
  735. }
  736. }
  737. .news-item-title {
  738. color: #555;
  739. font-size: 1.1rem;
  740. line-height: 1.3;
  741. height: 3.3rem;
  742. @media screen and (max-width: 767px) {
  743. font-size: 1.6rem;
  744. height: 4.8rem;
  745. }
  746. }
  747. .news-item-content {
  748. font-size: 0.9rem;
  749. // margin: 10px 0px 5px 0px;
  750. // 只显示3行剩下用...代替
  751. display: -webkit-box;
  752. -webkit-line-clamp: 2;
  753. line-clamp: 2;
  754. -webkit-box-orient: vertical;
  755. overflow: hidden;
  756. text-overflow: ellipsis;
  757. line-height: 1.4;
  758. max-height: 4.2em;
  759. /* 3行 × 1.4行高 = 4.2em */
  760. @media screen and (max-width: 767px) {
  761. font-size: 1.3rem;
  762. }
  763. }
  764. .news-item-date {
  765. font-size: 1rem;
  766. color: #999;
  767. @media screen and (min-width: 1024px) {
  768. font-size: 1rem;
  769. color: #999;
  770. }
  771. @media screen and (max-width: 767px) {
  772. font-size: 1.2rem;
  773. color: #999;
  774. margin-top: 0.5rem;
  775. }
  776. }
  777. .newsBtn {
  778. padding: 0.6rem 0rem;
  779. background-color: #F7B334;
  780. color: white;
  781. font-size: 1.1rem;
  782. text-align: center;
  783. width: 10rem;
  784. margin-top: 1rem;
  785. @media screen and (min-width: 1024px) {
  786. padding: 0.6rem 0rem;
  787. background-color: #F7B334;
  788. color: white;
  789. font-size: 1.1rem;
  790. text-align: center;
  791. width: 10rem;
  792. margin-top: 1rem;
  793. }
  794. @media screen and (max-width: 767px) {
  795. padding: 0.6rem 0rem;
  796. background-color: #F7B334;
  797. color: white;
  798. font-size: 1.2rem;
  799. text-align: center;
  800. width: 10rem;
  801. margin: 1rem auto;
  802. }
  803. }
  804. }
  805. .group-section {
  806. width: 70%;
  807. @media screen and (max-width: 767px) {
  808. width: 90%;
  809. display: flex;
  810. flex-direction: column;
  811. // margin:0 auto;
  812. }
  813. }
  814. .group-title {
  815. font-size: 2rem;
  816. font-weight: bold;
  817. text-align: center;
  818. margin-top: 4rem;
  819. @media screen and (min-width: 1024px) {
  820. font-size: 2rem;
  821. font-weight: bold;
  822. text-align: center;
  823. margin-top: 4rem;
  824. }
  825. @media screen and (max-width: 767px) {
  826. font-size: 1.8rem;
  827. font-weight: bold;
  828. text-align: center;
  829. margin-top: 1rem;
  830. }
  831. }
  832. .group-line {
  833. width: 6%;
  834. border-bottom: 0.3rem solid #F7B334;
  835. margin: 1.4rem auto;
  836. }
  837. .group-list {
  838. margin-top: 0.8rem;
  839. display: flex;
  840. flex-wrap: wrap;
  841. justify-content: flex-start;
  842. /* 改为从左开始排列 */
  843. text-align: center;
  844. gap: 1.5rem;
  845. /* 减小间距以适应更多元素 */
  846. @media screen and (min-width: 768px) and (max-width: 1024px) {
  847. margin-top: 0.8rem;
  848. display: flex;
  849. flex-wrap: wrap;
  850. justify-content: flex-start;
  851. /* 桌面端也从左开始排列 */
  852. text-align: center;
  853. gap: 2.2rem;
  854. /* 桌面端减小间距 */
  855. }
  856. @media screen and (min-width: 1024px) {
  857. margin-top: 0.8rem;
  858. display: flex;
  859. flex-wrap: wrap;
  860. justify-content: flex-start;
  861. /* 桌面端也从左开始排列 */
  862. text-align: center;
  863. gap: 1.4rem;
  864. /* 桌面端减小间距 */
  865. }
  866. @media screen and (max-width: 768px) {
  867. margin-top: 0.8rem;
  868. display: flex;
  869. flex-wrap: wrap;
  870. justify-content: flex-start;
  871. /* 桌面端也从左开始排列 */
  872. text-align: center;
  873. gap: 0rem;
  874. /* 桌面端减小间距 */
  875. }
  876. }
  877. .group-item {
  878. width: calc(18% - 0.4rem);
  879. /* 桌面端每行5个,更精确的计算 */
  880. padding: 0.5rem 0.3rem;
  881. /* 减小内边距以适应更多元素 */
  882. border: 1px solid #e9e9e9;
  883. border-radius: 8px;
  884. background-color: white;
  885. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  886. color: #F7B334;
  887. font-size: 1.1rem;
  888. cursor: pointer;
  889. transition: transform 0.2s ease;
  890. &:hover {
  891. transform: translateY(-2px);
  892. box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  893. }
  894. @media screen and (max-width: 767px) {
  895. // width: calc(30% - 0.5rem); /* 移动端每行3个 */
  896. padding: 0.65rem 0.4rem;
  897. border: 1px solid #e9e9e9;
  898. border-radius: 8px;
  899. background-color: white;
  900. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  901. color: #F7B334;
  902. font-size: 1.2rem;
  903. margin: 0.5rem;
  904. width: 45%;
  905. }
  906. @media screen and (min-width: 768px) and (max-width: 1024px) {
  907. width: calc(28% - 0.6rem);
  908. padding: 0.6rem 0.35rem;
  909. font-size: 1.0rem;
  910. margin: 1rem;
  911. }
  912. >div:nth-child(1) {
  913. margin-top: 1.3rem;
  914. font-size: 1.2rem;
  915. // font-weight: 550;
  916. border-bottom: 3px;
  917. @media screen and (min-width: 1024px) {
  918. margin-top: 1.3rem;
  919. font-size: 1.2rem;
  920. // font-weight: 550;
  921. border-bottom: 3px;
  922. }
  923. }
  924. >div:nth-child(2) {
  925. border: 1px solid #F7B334;
  926. width: 80%;
  927. margin: 0.5rem auto;
  928. }
  929. >img {
  930. width: 1.5rem;
  931. height: 1.5rem;
  932. margin-top: 0.3rem;
  933. }
  934. // }
  935. }
  936. // 响应式图片
  937. .responsive-img {
  938. max-width: 100%;
  939. height: auto;
  940. display: block;
  941. }
  942. // 高亮效果
  943. .highlight:hover {
  944. background: RGB(156, 214, 231);
  945. }
  946. .bgchover:hover {
  947. background: RGB(156, 214, 231);
  948. }
  949. // Swiper样式
  950. .swiper {
  951. width: 100%;
  952. height: 44.7rem;
  953. @media screen and (max-width: 767px) {
  954. height: 34rem;
  955. }
  956. }
  957. .news-section {
  958. .swiper {
  959. width: 100%;
  960. height: 30rem;
  961. @media screen and (max-width: 767px) {
  962. height: 25rem;
  963. }
  964. }
  965. }
  966. .swiper-slide {
  967. position: relative;
  968. background-color: #fafafa;
  969. width: 100%;
  970. }
  971. .age-modal {
  972. position: fixed;
  973. z-index: 99999;
  974. left: 0; top: 0; right: 0; bottom: 0;
  975. background: rgba(0,0,0,0.55);
  976. display: flex;
  977. align-items: center;
  978. justify-content: center;
  979. }
  980. .age-modal-content {
  981. background: #fff;
  982. border-radius: 12px;
  983. box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  984. padding: 2.5rem 2rem 2rem;
  985. max-width: 350px;
  986. width: 90%;
  987. text-align: center;
  988. }
  989. .age-modal-title {
  990. font-size: 1.3rem;
  991. font-weight: bold;
  992. margin-bottom: 1.2rem;
  993. color: #c9082c;
  994. }
  995. .age-modal-desc {
  996. font-size: 1.05rem;
  997. margin-bottom: 2rem;
  998. color: #333;
  999. }
  1000. .age-modal-actions {
  1001. display: flex;
  1002. justify-content: space-between;
  1003. gap: 1.2rem;
  1004. }
  1005. .age-btn {
  1006. flex: 1;
  1007. padding: 0.7rem 0.2rem;
  1008. border-radius: 6px;
  1009. border: none;
  1010. font-size: 1rem;
  1011. cursor: pointer;
  1012. font-weight: bold;
  1013. transition: background 0.2s;
  1014. }
  1015. .age-btn.deny {
  1016. background: #eee;
  1017. color: #c9082c;
  1018. }
  1019. .age-btn.confirm {
  1020. background: #F7B334;
  1021. color: #fff;
  1022. }
  1023. .age-btn:hover {
  1024. opacity: 0.85;
  1025. }
  1026. .contactContainer1 {
  1027. width: 100%;
  1028. height: 100%;
  1029. background-color: #f7f7f7;
  1030. padding-bottom: 5rem;
  1031. }
  1032. .contact {
  1033. width: 100%;
  1034. }
  1035. .fw {
  1036. // font-weight: 550;
  1037. color: #444;
  1038. }
  1039. .bgImg {
  1040. width: 100%;
  1041. >img {
  1042. width: 100%;
  1043. height: 100%;
  1044. }
  1045. }
  1046. .contactContent {
  1047. width: 65%;
  1048. margin: 0px auto 20px;
  1049. font-size: 1.3rem;
  1050. padding-top: 3rem;
  1051. >div:nth-child(1) {
  1052. font-size: 1.5rem;
  1053. color: #F7B334;
  1054. font-weight: bold;
  1055. margin-bottom: 1.7rem;
  1056. }
  1057. }
  1058. .cardContent {
  1059. display: flex;
  1060. justify-content: space-between;
  1061. >div {
  1062. width: 30%;
  1063. // height: 15rem;
  1064. background: #fff;
  1065. padding: 1rem;
  1066. text-align: center;
  1067. font-size: 1.6rem;
  1068. font-weight: 550;
  1069. color: #444;
  1070. >img {
  1071. width: 3rem;
  1072. height: 3rem;
  1073. margin: 2rem 0rem 0rem 0rem
  1074. }
  1075. >div:nth-child(2) {
  1076. font-size: 2.2rem;
  1077. color: #F7B334;
  1078. }
  1079. >div:nth-child(3),
  1080. >div:nth-child(4) {
  1081. font-size: 0.9rem;
  1082. color: #333;
  1083. margin-top: 0.5rem;
  1084. }
  1085. }
  1086. @media screen and (max-width: 767px) {
  1087. width: 100%;
  1088. display: block;
  1089. >div {
  1090. padding: 0rem;
  1091. width: 100%;
  1092. margin-bottom: 2rem;
  1093. padding-bottom: 2rem;
  1094. padding-top: 1rem;
  1095. }
  1096. }
  1097. }
  1098. </style>