up
This commit is contained in:
@@ -216,24 +216,57 @@
|
|||||||
|
|
||||||
|
|
||||||
// HERO SLIDER
|
// 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 $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 totalSlides = $heroSlider.find(".swiper-slide").length;
|
||||||
var shouldLoop = totalSlides > 2;
|
var shouldLoop = totalSlides > 1;
|
||||||
|
|
||||||
|
heroSlideCount = totalSlides;
|
||||||
|
|
||||||
var swiperOptions = {
|
var swiperOptions = {
|
||||||
loop: shouldLoop,
|
loop: shouldLoop,
|
||||||
|
initialSlide: 0,
|
||||||
preloadImages: true,
|
preloadImages: true,
|
||||||
updateOnImagesReady: true,
|
updateOnImagesReady: true,
|
||||||
speed: 1000,
|
speed: 1000,
|
||||||
parallax: true,
|
parallax: true,
|
||||||
autoplay: totalSlides > 1 ? {
|
autoplay: false,
|
||||||
delay: 6500,
|
|
||||||
disableOnInteraction: false,
|
|
||||||
} : false,
|
|
||||||
watchSlidesProgress: true,
|
watchSlidesProgress: true,
|
||||||
pagination: {
|
pagination: {
|
||||||
el: '.swiper-pagination',
|
el: '.swiper-pagination',
|
||||||
@@ -246,20 +279,12 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
on: {
|
on: {
|
||||||
progress: function() {
|
init: function() {
|
||||||
var swiper = this;
|
applyHeroInterleave(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");
|
|
||||||
|
|
||||||
if (slideInner) {
|
progress: function() {
|
||||||
slideInner.style.transform =
|
applyHeroInterleave(this);
|
||||||
"translate3d(" + innerTranslate + "px, 0, 0)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
touchStart: function() {
|
touchStart: function() {
|
||||||
@@ -287,15 +312,51 @@
|
|||||||
swiperOptions.loopedSlides = totalSlides;
|
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;
|
||||||
= HIDE PRELOADER
|
}
|
||||||
-------------------------------------------*/
|
|
||||||
function hidePreloader() {
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------
|
||||||
|
= HIDE PRELOADER
|
||||||
|
-------------------------------------------*/
|
||||||
|
function hidePreloader(onHidden) {
|
||||||
$('.preloader').delay(100).fadeOut(500, function() {
|
$('.preloader').delay(100).fadeOut(500, function() {
|
||||||
|
|
||||||
//active wow
|
//active wow
|
||||||
@@ -303,14 +364,27 @@
|
|||||||
wow.init();
|
wow.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof onHidden === "function") {
|
||||||
|
onHidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function preloader() {
|
function preloader() {
|
||||||
if($('.preloader').length) {
|
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/themify-icons.css" rel="stylesheet">
|
||||||
<link href="assets/css/flaticon.css" rel="stylesheet">
|
<link href="assets/css/flaticon.css" rel="stylesheet">
|
||||||
<link href="assets/css/animate.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">
|
<link href="assets/css/style.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- 非关键样式:延迟加载 -->
|
<!-- 非关键样式:延迟加载 -->
|
||||||
@@ -28,8 +29,6 @@
|
|||||||
<noscript><link rel="stylesheet" href="assets/css/slick.css"></noscript>
|
<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'">
|
<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>
|
<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'">
|
<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>
|
<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'">
|
<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="row">
|
||||||
<div class="cargo-platform-content col col-xs-12 col-md-12">
|
<div class="cargo-platform-content col col-xs-12 col-md-12">
|
||||||
<div class="cargo-info-left">
|
<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">
|
<p class="product-hero-description">
|
||||||
货运代理系统是全程物流链平台核心产品之一,针对货代业务特点,实现货物委托、提单确认、海关预配、EDI、费用结算等关键环节的高效操作。系统通过 AI 提升单证识别与费用对账能力,帮助企业减少人工处理、提升作业效率。
|
岸基货运代理系统是全程物流链平台核心产品之一,针对货代业务特点,实现货物委托、提单确认、海关预配、EDI、费用结算等关键环节的高效操作。系统通过 AI 提升单证识别与费用对账能力,帮助企业减少人工处理、提升作业效率。
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user