| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281 |
- <script setup>
- import Layout from '../components/common/Layout.vue';
- import { onBeforeUnmount, onMounted, ref, computed } from "vue";
- import { onLanguageChange, getCurrentLanguage } from '@/utils/language.js';
- import c1 from '../assets/images/newIndex/c1.png';
- import c2 from '../assets/images/newIndex/c2.png';
- import c3 from '../assets/images/newIndex/c3.png';
- import bannner from '../assets/images/banner.png';
- import { useRouter } from 'vue-router';
- import zhounian from '../assets/images/newIndex/80zhounian.jpg';
- import guanaishequ from '../assets/images/newsPic/guanaishequ.png';
- import lifa from '../assets/images/newsPic/lifa.png';
- import { useI18n } from 'vue-i18n'
- const { locale, messages } = useI18n()
- // 当前语言(可在模板或逻辑中使用)
- const currentLanguage = ref(getCurrentLanguage());
- // 存储取消订阅函数
- const offLanguageListener = ref(null);
- // 导入swiper组件
- import { Swiper, SwiperSlide } from "swiper/vue";
- // 引入swiper样式(按需导入)
- import "swiper/css";
- import "swiper/css/pagination"; // 轮播图底面的小圆点
- import "swiper/css/autoplay"; // 自动播放样式
- // 引入swiper核心和所需模块
- import { Mousewheel, Pagination, Autoplay } from "swiper/modules";
- const modules = [Mousewheel, Pagination, Autoplay];
- // swiper实例
- const homeSwiper = ref(null);
- // 初始化
- const onSwiper = (swiper) => {
- homeSwiper.value = swiper;
- };
- // swiper切换时触发
- // eslint-disable-next-line no-unused-vars
- const onSlideChange = (swiper) => {
- };
- const tabIndex = ref(0)
- const slideshow = ref([
- {
- ImageUrl: bannner,
- }
- ])
- const newImg = ref([
- {
- ImageUrl: zhounian,
- },
- {
- ImageUrl: guanaishequ,
- },
- {
- ImageUrl: lifa,
- }
- ])
- // eslint-disable-next-line no-unused-vars
- const advantageList = ref([
- { id: 1, Cover: c3, title: '烟叶业务', desc: '我们的烟叶业务是从全球主要烟叶产区采购各类型烟叶类产品,并销售至全球市场。。' },
- { id: 2, Cover: c2, title: '卷烟业务', desc: '我们的卷烟业务是从中国烟草旗下的卷烟生产企业采购卷烟产品,并销售至全球市场(中国内地除外)以及中国内地境内关外免税店。。' },
- { id: 3, Cover: c1, title: '新型烟草业务', desc: '我们的新型烟草业务是从中国烟草旗下的卷烟生产企业采购新型烟草制品,并独家销售至全球市场(中国内地除外)。' },
- ])
- // eslint-disable-next-line no-unused-vars
- const serviceList = ref([
- { id: 1, icon: 'am-icon-diamond', title: '多页面工作', desc: '标签栏可切换,不必为了新内容而被迫跳转界面,多项工作内容并行处理' },
- { id: 2, icon: 'am-icon-user', title: '多页面工作', desc: '标签栏可切换,不必为了新内容而被迫跳转界面,多项工作内容并行处理' },
- { id: 3, icon: 'am-icon-umbrella', title: '多页面工作', desc: '标签栏可切换,不必为了新内容而被迫跳转界面,多项工作内容并行处理' },
- { id: 4, icon: 'am-icon-briefcase', title: '多页面工作', desc: '标签栏可切换,不必为了新内容而被迫跳转界面,多项工作内容并行处理' },
- ]); const changeTab = (ind) => {
- tabIndex.value = ind
- // indexPhoto.value.style.opcity = '1'
- }
- const timer = ref(null)
- // eslint-disable-next-line no-unused-vars
- const swiper = () => {
- if (timer.value) {
- return
- }
- // eslint-disable-next-line no-unused-vars
- let looper = (a) => {
- if (tabIndex.value >= slideshow.value.length - 1) {
- tabIndex.value = -1
- }
- changeTab(tabIndex.value + 1)
- }
- timer.value = setInterval(looper, 3000)
- }
- const clearData = () => {
- if (timer.value) {
- clearInterval(timer.value);
- timer.value = null
- }
- }
- const card = ref('');
- // 当屏幕小于640px时,设置为vertical
- if (window.innerWidth < 640) {
- card.value = '';
- } else {
- card.value = 'card';
- }
- // 数字翻牌器
- import { useTransition } from '@vueuse/core'
- const source = ref(0)
- // eslint-disable-next-line no-unused-vars
- const outputValue = useTransition(source, {
- duration: 1500,
- })
- source.value = 24900;
- const source1 = ref(0)
- // eslint-disable-next-line no-unused-vars
- const outputValue1 = useTransition(source1, {
- duration: 1500,
- })
- source1.value = 87;
- const source2 = ref(0)
- // eslint-disable-next-line no-unused-vars
- const outputValue2 = useTransition(source2, {
- duration: 1500,
- })
- source2.value = 31;
- // eslint-disable-next-line no-unused-vars
- const formatter = (value) => {
- // 使用toFixed保留小数点后两位
- return `${value.toFixed(2)}`;
- }
- const source3 = ref(0)
- // eslint-disable-next-line no-unused-vars
- const outputValue3 = useTransition(source3, {
- duration: 1500,
- })
- source3.value = 0.97;
- // const videoPlayer = ref(null);
- // eslint-disable-next-line no-unused-vars
- const newsList = ref([
- {
- id: 2,
- title: '国际集团组织参观纪念抗战胜利80周年展览',
- content: '2025年8月26日下午,中烟国际集团有限公司组织全体员工前往香港会展中心,参观由香港大公文汇传媒集团主办的“为了中华民族伟大复兴——纪念中国人民抗日战争暨世界反法西斯战争胜利80周年大型巡回展览”',
- date: '2025-08-27'
- },
- {
- id: 9,
- title: '国际集团开展“中企关爱进社区”义工活动',
- content: '近日,国际集团与香港荃湾各界协会联合开展“中企关爱进社区”义工活动,向荃湾地区困难基层家庭进行探访慰问并送上冷暖风扇和空气净化一体机。 ',
- date: '2025-08-18'
- },
- {
- id: 10,
- title: '国际集团组织员工参观香港立法会活动',
- content: '2025年7月15日,国际集团组织员工赴香港立法会综合大楼参观,开展“爱国爱港主题教育”活动。本次活动得到了全国人大代表、香港立法会议员陈勇先生及工作人员的大力支持。',
- date: '2025-07-18'
- },
- ])
- // 获取新闻列表
- const newsListIndex = computed(() => messages.value[locale.value].message.newsListIndex)
- // 引用zh-CN里面的companyList数组
- // eslint-disable-next-line no-unused-vars
- const companyList = computed(() => messages.value[locale.value].message.companyList)
- const route = useRouter();
- // eslint-disable-next-line no-unused-vars
- const handleClick = (item) => {
- console.log('item', item);
- // 跳转到子公司详情页,使用路径参数传递
- route.push(`/subGroup/${item.id}`);
- console.log('点击了公司项:', item);
- }
- const handleGoNew = () => {
- // 跳转到新闻页面
- route.push('/news');
- }
- const goDetail = (id) => {
- route.push(`/newsDetail/${id}`);
- }
- // 移动端判断
- const isMobile = ref(false)
- // 检查是否为移动端
- const checkMobile = () => {
- isMobile.value = window.innerWidth <= 768
- }
- // 当语言是英文的时候,首页和路由都不要新闻列表了
- const showNews = computed(() => {
- return locale.value !== 'en'
- })
- onMounted(() => {
- // videoPlayer.value.play();
- // getSlideshow();
- // getAdvantage();
- // getService();
- // 初始化检查移动端
- checkMobile()
- // 初始化当前语言为 i18n 中的 locale(优先)
- currentLanguage.value = locale.value || getCurrentLanguage();
- // 订阅全局语言变更事件(使用 utils 封装)
- offLanguageListener.value = onLanguageChange((lang) => {
- currentLanguage.value = lang;
- console.log('IndexView detected language change:', lang);
- // 在这里可以执行语言切换后需要的额外逻辑(比如重新请求某些接口)
- });
- // 监听窗口大小变化
- window.addEventListener('resize', checkMobile)
- swiper();
- })
- onBeforeUnmount(() => {
- window.removeEventListener('resize', checkMobile)
- clearData();
- // 取消语言变更监听
- if (offLanguageListener.value) {
- offLanguageListener.value();
- offLanguageListener.value = null;
- }
- })
- </script>
- <template>
- <Layout>
- <div style="width: 100%">
- <div class="index-page">
- <!-- 使用Swiper替换原有的轮播 -->
- <Swiper
- :modules="modules" :slides-per-view="1" :space-between="0" :pagination="{ clickable: true }"
- :mousewheel="false" :allow-touch-move="true" :autoplay="{ delay: 3000, disableOnInteraction: false }"
- :loop="true" class="home-swiper" @swiper="onSwiper" @slide-change="onSlideChange">
- <SwiperSlide
- v-for="(slide, index) in slideshow" :key="index" class="swiper-slide-item" :style="{
- backgroundImage: `url(${slide.ImageUrl})`,
- backgroundRepeat: 'no-repeat',
- backgroundSize: 'cover',
- backgroundPosition: 'center'
- }">
- <div class="index-banner">
- <!-- 可以在这里添加轮播图上的内容 -->
- </div>
- </SwiperSlide>
- </Swiper>
- </div>
- </div>
- <div v-if="showNews" class="news-section">
- <div v-if="isMobile" class="newsTitle">{{ $t('message.t3') }}</div>
- <div>
- <Swiper
- :modules="modules" :slides-per-view="1" :space-between="0" :pagination="{ clickable: true }"
- :mousewheel="false" :allow-touch-move="true" :autoplay="{ delay: 3000, disableOnInteraction: false }"
- :loop="true" class="home-swiper" @swiper="onSwiper" @slide-change="onSlideChange">
- <SwiperSlide
- v-for="(slide, index) in newImg" :key="index" class="swiper-slide-item" :style="{
- backgroundImage: `url(${slide.ImageUrl})`,
- backgroundRepeat: 'no-repeat',
- backgroundSize: '100% auto',
- backgroundPosition: 'center'
- }">
- <div class="index-banner">
- <!-- 可以在这里添加轮播图上的内容 -->
- </div>
- </SwiperSlide>
- </Swiper>
- </div>
- <div class="news-content">
- <div v-if="!isMobile" class="newsTitle">{{ $t('message.t3') }}</div>
- <div class="news-boxes">
- <div v-for="item in newsListIndex" :key="item.title" class="news-item" @click="goDetail(item.id)">
- <div class="news-item-title">{{ item.title }}</div>
- <div class="news-item-content">{{ item.content }}</div>
- <span class="news-item-date">{{ item.date }}</span>
- </div>
- </div>
- <div class="newsBtn" @click="handleGoNew">{{ $t('message.gengduoxinwen') }}</div>
- </div>
- </div>
- <div v-else>
- <div class="contactContainer1">
- <div class="contactContent">
- <div>{{ $t("message.ywjs") }}</div>
- <div class="fw" style=" text-indent: 2em;">{{ $t('message.ywjs2') }}</div>
- <div class="fw">{{ $t('message.ywjs3') }}</div>
- <div class="fw">{{ $t('message.ywjs4') }}</div>
- </div>
- <div class="contactContent">
- <div>{{ $t('message.ywzx') }}</div>
- <div class="cardContent">
- <div>
- <img src="../assets/images/call.png" alt="">
- <div>
- +852-26206011
- </div>
- <div>
- marketing@cti-group.com.hk
- </div>
- <div>
- <div>{{ $t('message.ywzx2') }}</div>
- </div>
- </div>
- <div>
- <img src="../assets/images/call.png" alt="">
- <div>
- +852-26206308
- </div>
- <div>
- supplychain@cti-group.com.hk
- </div>
- <div>
- <div>{{ $t('message.ywzx1') }}</div>
- </div>
- </div>
- <div>
- <img src="../assets/images/call.png" alt="">
- <div>
- +852-26206055
- </div>
- <div>
- production@cti-group.com.hk
- </div>
- <div>
- <div>{{ $t('message.ywzx3') }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- <div class="group-section">
- <div class="group-title">{{ $t('message.suoshuqiye') }}</div>
- <div class="group-line"></div>
- <div class="group-list">
- <div v-for="(item, index) in companyList" class="group-item" :key="index" @click="handleClick(item)">
- <div>{{ item.name }}</div>
- <div></div>
- <img src="../assets/images/newIndex/svg.png" alt="">
- </div>
- </div>
- </div> -->
- </Layout>
- </template>
- <style lang="scss" scoped>
- // Swiper轮播图样式
- .home-swiper {
- width: 100%;
- // height: 700px;
- // @media screen and (min-width: 768px) {
- // height: 500px;
- // }
- // @media screen and (min-width: 1024px) {
- // height: 600px;
- // }
- // 轮播项样式
- .swiper-slide-item {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- }
- // 分页器样式
- :deep(.swiper-pagination) {
- bottom: 20px !important;
- .swiper-pagination-bullet {
- background: rgba(255, 255, 255, 0.9);
- opacity: 1;
- width: 0.6rem;
- height: 0.6rem;
- margin: 0 0.4rem;
- transition: all 0.3s ease;
- &.swiper-pagination-bullet-active {
- background: #F7B334;
- width: 1.5rem;
- /* 激活状态下的横线更长 */
- height: 0.6rem;
- transform: scale(1.1);
- border-radius: 3px;
- }
- }
- }
- }
- // 公司介绍部分响应式
- .section {
- padding: 40px 0;
- @media screen and (min-width: 768px) {
- padding: 60px 0;
- }
- @media screen and (min-width: 1024px) {
- padding: 80px 0;
- }
- .section--header {
- .section--title {
- font-size: 2rem;
- font-weight: 300;
- text-align: center;
- margin-bottom: 1rem;
- @media screen and (min-width: 768px) {
- font-size: 2.5rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 3rem;
- }
- }
- .english-title {
- font-size: 1.5rem;
- color: #007557;
- text-align: center;
- font-weight: bold;
- @media screen and (min-width: 768px) {
- font-size: 2rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 2.5rem;
- }
- }
- .english-title1 {
- font-size: 1rem;
- color: #007557;
- text-align: center;
- margin-bottom: 2rem;
- @media screen and (min-width: 768px) {
- font-size: 1.2rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 1.5rem;
- }
- }
- }
- .container1 {
- display: flex;
- align-items: center;
- gap: 2rem;
- @media screen and (max-width: 767px) {
- flex-direction: column;
- gap: 1rem;
- }
- .boxs {
- width: 100%;
- position: relative;
- top: -20px;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- padding: 10px;
- background: white;
- border-radius: 8px;
- @media screen and (min-width: 768px) {
- width: 40%;
- }
- @media screen and (max-width: 767px) {
- top: 0;
- order: 2;
- }
- }
- .section--description-index {
- width: 100%;
- font-size: 1rem;
- line-height: 1.6;
- color: #9b9b9b;
- text-align: left;
- margin: 0;
- @media screen and (min-width: 768px) {
- width: 60%;
- font-size: 1.1rem;
- }
- @media screen and (min-width: 1024px) {
- width: 54%;
- font-size: 1.2rem;
- }
- @media screen and (max-width: 767px) {
- order: 1;
- text-align: center;
- }
- .moremore {
- color: #007557;
- cursor: pointer;
- margin-top: 1rem;
- font-weight: bold;
- &:hover {
- text-decoration: underline;
- }
- }
- }
- }
- }
- // 数字统计部分响应式
- .numberBox {
- display: flex;
- justify-content: space-around;
- margin-top: 2rem;
- flex-wrap: wrap;
- gap: 1rem;
- @media screen and (max-width: 767px) {
- flex-direction: column;
- align-items: center;
- }
- .number-item {
- text-align: center;
- flex: 1;
- min-width: 200px;
- @media screen and (max-width: 767px) {
- min-width: auto;
- width: 100%;
- }
- .number-value {
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 0.5rem;
- }
- .number-label {
- font-size: 0.9rem;
- margin-top: 0.5rem;
- color: #666;
- @media screen and (min-width: 768px) {
- font-size: 1rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 1.1rem;
- }
- }
- .unit {
- font-size: 0.8rem;
- @media screen and (min-width: 768px) {
- font-size: 0.9rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 1rem;
- }
- }
- &:nth-child(1),
- &:nth-child(4) {
- .el-statistic__number {
- color: #c9082c;
- font-weight: bold;
- font-size: 1.5rem;
- @media screen and (min-width: 768px) {
- font-size: 1.8rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 2rem;
- }
- }
- }
- &:nth-child(2),
- &:nth-child(3) {
- .el-statistic__number {
- color: #006953;
- font-weight: bold;
- font-size: 1.5rem;
- @media screen and (min-width: 768px) {
- font-size: 1.8rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 2rem;
- }
- }
- }
- }
- }
- // 业务介绍部分响应式
- .index-container {
- .avdlayout {
- margin-top: 3rem;
- }
- .am-g {
- display: flex;
- flex-wrap: wrap;
- gap: 2rem;
- @media screen and (max-width: 767px) {
- flex-direction: column;
- gap: 1.5rem;
- }
- }
- .am-u-md-31 {
- flex: 1;
- min-width: 300px;
- @media screen and (max-width: 767px) {
- min-width: auto;
- }
- }
- .features_item {
- text-align: center;
- padding: 1.5rem;
- background: white;
- border-radius: 8px;
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
- transition: transform 0.3s ease;
- &:hover {
- transform: translateY(-5px);
- }
- .imgg {
- width: 100%;
- height: 200px;
- border-radius: 8px;
- margin-bottom: 1rem;
- @media screen and (max-width: 767px) {
- height: 150px;
- }
- }
- .features_item--title {
- font-size: 1.2rem;
- font-weight: bold;
- color: #333;
- margin-bottom: 1rem;
- @media screen and (min-width: 768px) {
- font-size: 1.4rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 1.6rem;
- }
- }
- .features_item--text {
- font-size: 0.9rem;
- line-height: 1.6;
- color: #666;
- @media screen and (min-width: 768px) {
- font-size: 1rem;
- }
- @media screen and (min-width: 1024px) {
- font-size: 1.1rem;
- }
- }
- }
- }
- // 新闻部分响应式
- .news-section {
- padding-top: 0;
- width: 70%;
- display: flex;
- justify-content: space-between;
- height: 37rem;
- margin-top: 6rem;
- flex: 1;
- @media screen and (min-width: 1024px) {
- width: 70%;
- display: flex;
- flex: 1;
- margin-top: 6rem;
- height: 37rem !important;
- /* 增加 !important 确保优先级 */
- max-height: 37rem;
- /* 限制最大高度 */
- }
- @media screen and (max-width: 767px) {
- width: 100%;
- flex-direction: column;
- margin-top: 0;
- }
- >div {
- @media screen and (min-width: 1024px) {
- width: 50%;
- }
- .newsTitle {
- font-size: 1.6rem;
- font-weight: 700;
- border-bottom: 0.2rem solid #F7B334;
- padding-bottom: 0.9rem;
- width: 46%;
- @media screen and (min-width: 1024px) {
- font-size: 1.6rem;
- font-weight: 700;
- border-bottom: 0.2rem solid #F7B334;
- padding-bottom: 0.9rem;
- width: 46%;
- }
- }
- }
- >div:nth-child(1) {
- width: 57%;
- @media screen and (min-width: 1024px) {
- width: 57%;
- }
- @media screen and (max-width: 767px) {
- width: 80%;
- padding: 1.5rem 1rem;
- margin: 0rem auto 2rem;
- font-size: 2.2rem;
- border-bottom: 0.3rem solid #F7B334;
- font-weight: 700;
- }
- }
- >div:nth-child(2) {
- width: 38%;
- @media screen and (min-width: 1024px) {
- width: 38%;
- }
- @media screen and (max-width: 767px) {
- width: 80%;
- margin: 0rem auto;
- }
- }
- >div:nth-child(3) {
- @media screen and (max-width: 767px) {
- width: 100%;
- margin: 1rem auto;
- }
- }
- .news-content {
- display: flex;
- flex-direction: column;
- // 上下两端对齐
- justify-content: space-between;
- margin-left: 3rem;
- margin-top: -3.4rem;
- @media screen and (min-width: 1024px) {
- margin-left: 3rem;
- margin-top: -3.4rem;
- }
- }
- .news-boxes {
- @media screen and (min-width: 1024px) {
- // display: flex;
- // flex-wrap: wrap;
- }
- @media screen and (max-width: 767px) {
- width: 90%;
- margin: 1rem auto;
- >div:nth-child(1) {
- margin-top: 0;
- }
- }
- // >div:nth-child(even) {
- // @media screen and (min-width: 1024px) {
- // margin-left: 5%;
- // }
- // }
- // >div:nth-child(1),>div:nth-child(2) {
- // @media screen and (min-width: 1024px) {
- // margin-top: 0;
- // }
- // }
- }
- .news-item {
- color: #666666;
- cursor: pointer;
- position: relative;
- width: 100%;
- // padding-bottom: 0.9rem;
- border-bottom: 1px solid #e9e9e9;
- margin-top: 1rem;
- font-size: 1.6rem;
- @media screen and (min-width: 1024px) {
- position: relative;
- width: 100%;
- // padding-bottom: 0.9rem;
- border-bottom: 1px solid #e9e9e9;
- margin-top: 1rem;
- font-size: 1.6rem;
- }
- @media screen and (max-width: 767px) {
- width: 100%;
- border-bottom: 1px solid #e9e9e9;
- margin-top: 1.5rem;
- font-size: 1.4rem;
- padding: 0rem 0rem 1rem;
- }
- }
- .news-item-title {
- color: #555;
- font-size: 1.1rem;
- line-height: 1.3;
- height: 3.3rem;
- @media screen and (max-width: 767px) {
- font-size: 1.6rem;
- height: 4.8rem;
- }
- }
- .news-item-content {
- font-size: 0.9rem;
- // margin: 10px 0px 5px 0px;
- // 只显示3行剩下用...代替
- display: -webkit-box;
- -webkit-line-clamp: 2;
- line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 1.4;
- max-height: 4.2em;
- /* 3行 × 1.4行高 = 4.2em */
- @media screen and (max-width: 767px) {
- font-size: 1.3rem;
- }
- }
- .news-item-date {
- font-size: 1rem;
- color: #999;
- @media screen and (min-width: 1024px) {
- font-size: 1rem;
- color: #999;
- }
- @media screen and (max-width: 767px) {
- font-size: 1.2rem;
- color: #999;
- margin-top: 0.5rem;
- }
- }
- .newsBtn {
- padding: 0.6rem 0rem;
- background-color: #F7B334;
- color: white;
- font-size: 1.1rem;
- text-align: center;
- width: 10rem;
- margin-top: 1rem;
- @media screen and (min-width: 1024px) {
- padding: 0.6rem 0rem;
- background-color: #F7B334;
- color: white;
- font-size: 1.1rem;
- text-align: center;
- width: 10rem;
- margin-top: 1rem;
- }
- @media screen and (max-width: 767px) {
- padding: 0.6rem 0rem;
- background-color: #F7B334;
- color: white;
- font-size: 1.2rem;
- text-align: center;
- width: 10rem;
- margin: 1rem auto;
- }
- }
- }
- .group-section {
- width: 70%;
- @media screen and (max-width: 767px) {
- width: 90%;
- display: flex;
- flex-direction: column;
- // margin:0 auto;
- }
- }
- .group-title {
- font-size: 2rem;
- font-weight: bold;
- text-align: center;
- margin-top: 4rem;
- @media screen and (min-width: 1024px) {
- font-size: 2rem;
- font-weight: bold;
- text-align: center;
- margin-top: 4rem;
- }
- @media screen and (max-width: 767px) {
- font-size: 1.8rem;
- font-weight: bold;
- text-align: center;
- margin-top: 1rem;
- }
- }
- .group-line {
- width: 6%;
- border-bottom: 0.3rem solid #F7B334;
- margin: 1.4rem auto;
- }
- .group-list {
- margin-top: 0.8rem;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- /* 改为从左开始排列 */
- text-align: center;
- gap: 1.5rem;
- /* 减小间距以适应更多元素 */
- @media screen and (min-width: 768px) and (max-width: 1024px) {
- margin-top: 0.8rem;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- /* 桌面端也从左开始排列 */
- text-align: center;
- gap: 2.2rem;
- /* 桌面端减小间距 */
- }
- @media screen and (min-width: 1024px) {
- margin-top: 0.8rem;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- /* 桌面端也从左开始排列 */
- text-align: center;
- gap: 1.4rem;
- /* 桌面端减小间距 */
- }
- @media screen and (max-width: 768px) {
- margin-top: 0.8rem;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- /* 桌面端也从左开始排列 */
- text-align: center;
- gap: 0rem;
- /* 桌面端减小间距 */
- }
- }
- .group-item {
- width: calc(18% - 0.4rem);
- /* 桌面端每行5个,更精确的计算 */
- padding: 0.5rem 0.3rem;
- /* 减小内边距以适应更多元素 */
- border: 1px solid #e9e9e9;
- border-radius: 8px;
- background-color: white;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- color: #F7B334;
- font-size: 1.1rem;
- cursor: pointer;
- transition: transform 0.2s ease;
- &:hover {
- transform: translateY(-2px);
- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
- }
- @media screen and (max-width: 767px) {
- // width: calc(30% - 0.5rem); /* 移动端每行3个 */
- padding: 0.65rem 0.4rem;
- border: 1px solid #e9e9e9;
- border-radius: 8px;
- background-color: white;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- color: #F7B334;
- font-size: 1.2rem;
- margin: 0.5rem;
- width: 45%;
- }
- @media screen and (min-width: 768px) and (max-width: 1024px) {
- width: calc(28% - 0.6rem);
- padding: 0.6rem 0.35rem;
- font-size: 1.0rem;
- margin: 1rem;
- }
- >div:nth-child(1) {
- margin-top: 1.3rem;
- font-size: 1.2rem;
- // font-weight: 550;
- border-bottom: 3px;
- @media screen and (min-width: 1024px) {
- margin-top: 1.3rem;
- font-size: 1.2rem;
- // font-weight: 550;
- border-bottom: 3px;
- }
- }
- >div:nth-child(2) {
- border: 1px solid #F7B334;
- width: 80%;
- margin: 0.5rem auto;
- }
- >img {
- width: 1.5rem;
- height: 1.5rem;
- margin-top: 0.3rem;
- }
- // }
- }
- // 响应式图片
- .responsive-img {
- max-width: 100%;
- height: auto;
- display: block;
- }
- // 高亮效果
- .highlight:hover {
- background: RGB(156, 214, 231);
- }
- .bgchover:hover {
- background: RGB(156, 214, 231);
- }
- // Swiper样式
- .swiper {
- width: 100%;
- height: 44.7rem;
- @media screen and (max-width: 767px) {
- height: 34rem;
- }
- }
- .news-section {
- .swiper {
- width: 100%;
- height: 30rem;
- @media screen and (max-width: 767px) {
- height: 25rem;
- }
- }
- }
- .swiper-slide {
- position: relative;
- background-color: #fafafa;
- width: 100%;
- }
- .age-modal {
- position: fixed;
- z-index: 99999;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.55);
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .age-modal-content {
- background: #fff;
- border-radius: 12px;
- box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18);
- padding: 2.5rem 2rem 2rem;
- max-width: 350px;
- width: 90%;
- text-align: center;
- }
- .age-modal-title {
- font-size: 1.3rem;
- font-weight: bold;
- margin-bottom: 1.2rem;
- color: #c9082c;
- }
- .age-modal-desc {
- font-size: 1.05rem;
- margin-bottom: 2rem;
- color: #333;
- }
- .age-modal-actions {
- display: flex;
- justify-content: space-between;
- gap: 1.2rem;
- }
- .age-btn {
- flex: 1;
- padding: 0.7rem 0.2rem;
- border-radius: 6px;
- border: none;
- font-size: 1rem;
- cursor: pointer;
- font-weight: bold;
- transition: background 0.2s;
- }
- .age-btn.deny {
- background: #eee;
- color: #c9082c;
- }
- .age-btn.confirm {
- background: #F7B334;
- color: #fff;
- }
- .age-btn:hover {
- opacity: 0.85;
- }
- .contactContainer1 {
- width: 100%;
- height: 100%;
- background-color: #f7f7f7;
- padding-bottom: 5rem;
- }
- .contact {
- width: 100%;
- }
- .fw {
- // font-weight: 550;
- color: #444;
- margin-top: 2rem;
- }
- .bgImg {
- width: 100%;
- >img {
- width: 100%;
- height: 100%;
- }
- }
- .contactContent {
- width: 65%;
- margin: 0px auto 20px;
- font-size: 1.3rem;
- padding-top: 3rem;
- >div:nth-child(1) {
- font-size: 1.5rem;
- color: #F7B334;
- font-weight: bold;
- margin-bottom: 1.7rem;
- }
- }
- .cardContent {
- display: flex;
- justify-content: space-between;
- >div {
- width: 30%;
- // height: 15rem;
- background: #fff;
- padding: 1rem;
- text-align: center;
- font-size: 1.6rem;
- font-weight: 550;
- color: #444;
- >img {
- width: 3rem;
- height: 3rem;
- margin: 2rem 0rem 0rem 0rem
- }
- >div:nth-child(2) {
- font-size: 2.2rem;
- color: #F7B334;
- }
- >div:nth-child(3),
- >div:nth-child(4) {
- font-size: 0.9rem;
- color: #333;
- margin-top: 0.5rem;
- }
- }
- @media screen and (max-width: 767px) {
- width: 100%;
- display: block;
- >div {
- padding: 0rem;
- width: 100%;
- margin-bottom: 2rem;
- padding-bottom: 2rem;
- padding-top: 1rem;
- }
- }
- }
- </style>
|