up
This commit is contained in:
@@ -216,24 +216,57 @@
|
||||
|
||||
|
||||
// HERO SLIDER
|
||||
if (typeof Swiper === "function" && jQuery(".hero-slider .swiper-container").length) {
|
||||
var heroSwiper = null;
|
||||
var heroSlideCount = 0;
|
||||
var heroAutoplayOptions = {
|
||||
delay: 6500,
|
||||
disableOnInteraction: false,
|
||||
stopOnLastSlide: false
|
||||
};
|
||||
|
||||
function applyHeroInterleave(swiper) {
|
||||
if (!swiper || !swiper.slides) {
|
||||
return;
|
||||
}
|
||||
|
||||
var interleaveOffset = getHeroInterleaveOffset();
|
||||
var innerOffset = (swiper.width || 0) * interleaveOffset;
|
||||
|
||||
for (var i = 0; i < swiper.slides.length; i++) {
|
||||
var slideProgress = Math.max(Math.min(swiper.slides[i].progress || 0, 1), -1);
|
||||
var innerTranslate = slideProgress * innerOffset;
|
||||
var slideInner = swiper.slides[i].querySelector(".slide-inner");
|
||||
|
||||
if (slideInner) {
|
||||
slideInner.style.transform =
|
||||
"translate3d(" + innerTranslate + "px, 0, 0)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initHeroSlider() {
|
||||
if (heroSwiper) {
|
||||
return heroSwiper;
|
||||
}
|
||||
|
||||
if (typeof Swiper !== "function" || !jQuery(".hero-slider .swiper-container").length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var $heroSlider = jQuery(".hero-slider .swiper-container");
|
||||
var menu = [];
|
||||
$heroSlider.find('.swiper-slide').each( function(index){
|
||||
menu.push( jQuery(this).find('.slide-inner').attr("data-text") );
|
||||
});
|
||||
var totalSlides = $heroSlider.find(".swiper-slide").length;
|
||||
var shouldLoop = totalSlides > 2;
|
||||
var shouldLoop = totalSlides > 1;
|
||||
|
||||
heroSlideCount = totalSlides;
|
||||
|
||||
var swiperOptions = {
|
||||
loop: shouldLoop,
|
||||
initialSlide: 0,
|
||||
preloadImages: true,
|
||||
updateOnImagesReady: true,
|
||||
speed: 1000,
|
||||
parallax: true,
|
||||
autoplay: totalSlides > 1 ? {
|
||||
delay: 6500,
|
||||
disableOnInteraction: false,
|
||||
} : false,
|
||||
autoplay: false,
|
||||
watchSlidesProgress: true,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
@@ -246,20 +279,12 @@
|
||||
},
|
||||
|
||||
on: {
|
||||
progress: function() {
|
||||
var swiper = this;
|
||||
var interleaveOffset = getHeroInterleaveOffset();
|
||||
for (var i = 0; i < swiper.slides.length; i++) {
|
||||
var slideProgress = Math.max(Math.min(swiper.slides[i].progress, 1), -1);
|
||||
var innerOffset = swiper.width * interleaveOffset;
|
||||
var innerTranslate = slideProgress * innerOffset;
|
||||
var slideInner = swiper.slides[i].querySelector(".slide-inner");
|
||||
init: function() {
|
||||
applyHeroInterleave(this);
|
||||
},
|
||||
|
||||
if (slideInner) {
|
||||
slideInner.style.transform =
|
||||
"translate3d(" + innerTranslate + "px, 0, 0)";
|
||||
}
|
||||
}
|
||||
progress: function() {
|
||||
applyHeroInterleave(this);
|
||||
},
|
||||
|
||||
touchStart: function() {
|
||||
@@ -287,7 +312,43 @@
|
||||
swiperOptions.loopedSlides = totalSlides;
|
||||
}
|
||||
|
||||
var swiper = new Swiper(".hero-slider .swiper-container", swiperOptions);
|
||||
heroSwiper = new Swiper(".hero-slider .swiper-container", swiperOptions);
|
||||
applyHeroInterleave(heroSwiper);
|
||||
|
||||
return heroSwiper;
|
||||
}
|
||||
|
||||
function resetHeroToFirstSlide() {
|
||||
if (!heroSwiper) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (heroSwiper.params && heroSwiper.params.loop && typeof heroSwiper.slideToLoop === "function") {
|
||||
heroSwiper.slideToLoop(0, 0, false);
|
||||
} else if (typeof heroSwiper.slideTo === "function") {
|
||||
heroSwiper.slideTo(0, 0, false);
|
||||
}
|
||||
|
||||
if (typeof heroSwiper.updateProgress === "function") {
|
||||
heroSwiper.updateProgress();
|
||||
}
|
||||
|
||||
if (typeof heroSwiper.updateSlidesClasses === "function") {
|
||||
heroSwiper.updateSlidesClasses();
|
||||
}
|
||||
|
||||
applyHeroInterleave(heroSwiper);
|
||||
}
|
||||
|
||||
function startHeroAutoplay() {
|
||||
resetHeroToFirstSlide();
|
||||
|
||||
if (!heroSwiper || heroSlideCount <= 1 || !heroSwiper.autoplay || typeof heroSwiper.autoplay.start !== "function") {
|
||||
return;
|
||||
}
|
||||
|
||||
heroSwiper.params.autoplay = $.extend({}, heroAutoplayOptions);
|
||||
heroSwiper.autoplay.start();
|
||||
}
|
||||
|
||||
|
||||
@@ -295,7 +356,7 @@
|
||||
/*------------------------------------------
|
||||
= HIDE PRELOADER
|
||||
-------------------------------------------*/
|
||||
function hidePreloader() {
|
||||
function hidePreloader(onHidden) {
|
||||
$('.preloader').delay(100).fadeOut(500, function() {
|
||||
|
||||
//active wow
|
||||
@@ -303,14 +364,27 @@
|
||||
wow.init();
|
||||
}
|
||||
|
||||
if (typeof onHidden === "function") {
|
||||
onHidden();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function preloader() {
|
||||
if($('.preloader').length) {
|
||||
waitForHeroBackgrounds(hidePreloader);
|
||||
waitForHeroBackgrounds(function() {
|
||||
initHeroSlider();
|
||||
resetHeroToFirstSlide();
|
||||
hidePreloader(startHeroAutoplay);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
initHeroSlider();
|
||||
resetHeroToFirstSlide();
|
||||
startHeroAutoplay();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<link href="assets/css/themify-icons.css" rel="stylesheet">
|
||||
<link href="assets/css/flaticon.css" rel="stylesheet">
|
||||
<link href="assets/css/animate.css" rel="stylesheet">
|
||||
<link href="assets/css/swiper.min.css" rel="stylesheet">
|
||||
<link href="assets/css/style.css" rel="stylesheet">
|
||||
|
||||
<!-- 非关键样式:延迟加载 -->
|
||||
@@ -28,8 +29,6 @@
|
||||
<noscript><link rel="stylesheet" href="assets/css/slick.css"></noscript>
|
||||
<link rel="preload" href="assets/css/slick-theme.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="assets/css/slick-theme.css"></noscript>
|
||||
<link rel="preload" href="assets/css/swiper.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="assets/css/swiper.min.css"></noscript>
|
||||
<link rel="preload" href="assets/css/owl.transitions.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="assets/css/owl.transitions.css"></noscript>
|
||||
<link rel="preload" href="assets/css/odometer-theme-default.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
|
||||
@@ -69,9 +69,9 @@
|
||||
<div class="row">
|
||||
<div class="cargo-platform-content col col-xs-12 col-md-12">
|
||||
<div class="cargo-info-left">
|
||||
<h2 id="cargoTitle" class="product-hero-title">岸基全程物流链平台-货运代理系统</h2>
|
||||
<h2 id="cargoTitle" class="product-hero-title">岸基货运代理系统</h2>
|
||||
<p class="product-hero-description">
|
||||
货运代理系统是全程物流链平台核心产品之一,针对货代业务特点,实现货物委托、提单确认、海关预配、EDI、费用结算等关键环节的高效操作。系统通过 AI 提升单证识别与费用对账能力,帮助企业减少人工处理、提升作业效率。
|
||||
岸基货运代理系统是全程物流链平台核心产品之一,针对货代业务特点,实现货物委托、提单确认、海关预配、EDI、费用结算等关键环节的高效操作。系统通过 AI 提升单证识别与费用对账能力,帮助企业减少人工处理、提升作业效率。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user