Authored by wangtao

公司网站 优化调整

... ... @@ -74,7 +74,7 @@
<div class="navbar-collapse navbar-collapse-one collapse clearfix">
<ul class="navigation clearfix">
<li class="current" top-nav="/">
<li class="current" top-nav="home">
<router-link to="/">首页</router-link>
</li>
<li top-nav="services">
... ... @@ -129,7 +129,7 @@
<!--Footer Column-->
<div class="col-sm-4">
<div class="footer-widget links-widget">
<h4 class="footer-title">产品内容1</h4>
<h4 class="footer-title">产品内容</h4>
<div class="widget-content">
<ul>
<li><a href="#">综合告警智能算法平台</a></li>
... ... @@ -143,7 +143,7 @@
<div class="col-sm-4">
<div class="footer-widget links-widget">
<h4 class="footer-title">产品内容2</h4>
<h4 style=" font-weight: 600;position: relative;margin-bottom: 40px;text-transform: capitalize;">&nbsp;</h4>
<div class="widget-content">
<ul>
<li><a href="#">日志综合智能分析平台</a></li>
... ... @@ -166,7 +166,9 @@
<h4 class="footer-title">关于我们</h4>
<div class="widget-content">
<ul>
<li><a href="#">公司简介</a></li>
<li>
<router-link to="/about">公司简介</router-link>
</li>
<li><a href="#">合作流程</a></li>
</ul>
</div>
... ...
export default {
mounted() {
this.pageInit()
},
create(){
this.pageInit()
},
methods: {
pageInit(){
// Loading Box (Preloader)
function handlePreloader() {
setTimeout(function (){
if ($('.preloader').length) {
$('.preloader').delay(200).fadeOut(500);
}
},1000);
}
// Header Style and Scroll to Top
function headerStyle() {
if ($('.main-header').length) {
var windowpos = $(window).scrollTop();
var siteHeader = $('.main-header');
var scrollLink = $('.scroll-top');
if (windowpos >= 250) {
siteHeader.addClass('fixed-header');
scrollLink.fadeIn(300);
} else {
siteHeader.removeClass('fixed-header');
scrollLink.fadeOut(300);
}
}
}
headerStyle();
// dropdown menu
var mobileWidth = 991;
var navcollapse = $('.navigation li.dropdown');
$(window).on('resize', function () {
navcollapse.children('ul').hide();
});
navcollapse.hover(function () {
if ($(window).innerWidth() >= mobileWidth) {
$(this).children('ul').stop(true, false, true).slideToggle(300);
$(this).children('.megamenu').stop(true, false, true).slideToggle(300);
}
});
//Submenu Dropdown Toggle
if ($('.navigation li.dropdown ul').length) {
$('.navigation li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-right"></span></div>');
//Dropdown Button
$('.navigation li.dropdown .dropdown-btn').on('click', function () {
$(this).prev('ul').slideToggle(500);
$(this).prev('.megamenu').slideToggle(800);
});
//Disable dropdown parent link
$('.navigation li.dropdown > a').on('click', function (e) {
e.preventDefault();
});
}
//Submenu Dropdown Toggle
if ($('.main-header .main-menu').length) {
$('.main-header .main-menu .navbar-toggle').on('click', function () {
$(this).prev().prev().next().next().children('li.dropdown').hide();
});
}
// End Main menu
new WOW().init();
/* Fact Counter + Text Count */
if ($('.success-box').length) {
$('.success-box').appear(function () {
var $t = $(this),
n = $t.find(".count-text").attr("data-stop"),
r = parseInt($t.find(".count-text").attr("data-speed"), 10);
if (!$t.hasClass("counted")) {
$t.addClass("counted");
$({
countNum: $t.find(".count-text").text()
}).animate({
countNum: n
}, {
duration: r,
easing: "linear",
step: function () {
$t.find(".count-text").text(Math.floor(this.countNum));
},
complete: function () {
$t.find(".count-text").text(this.countNum);
}
});
}
}, {
accY: 0
});
}
/*========== Start Portfolio isotop Js ==========*/
// isotop
// init Isotope
var $grid = $('.custom-row').isotope({
itemSelector: '.grid-item',
percentPosition: true,
masonry: {
// use outer width of grid-sizer for columnWidth
columnWidth: 1,
}
});
// magnificPopup
if ($('.projects-popup-link').length) {
$('.projects-popup-link').magnificPopup({
type: 'image',
gallery: {
enabled: true
},
});
}
/*============================== start video element ========================================*/
// magnificPopup start
$('.vedio-play').magnificPopup({
type: 'video',
});
// magnificPopup end
//service-carousel
if ($('.service-carousel').length) {
$('.service-carousel').owlCarousel({
loop: true,
items: 3,
margin: 20,
nav: false,
dots: true,
active: true,
dotsEach: 2,
smartSpeed: 1000,
autoplay: 5000,
responsive: {
0: {
items: 1,
},
575: {
items: 1,
},
768: {
items: 2,
},
992: {
items: 3,
},
1200: {
items: 3,
}
}
});
}
//team-carousel
if ($('.team-carousel').length) {
$('.team-carousel').owlCarousel({
loop: true,
items: 3,
margin: 20,
nav: true,
dots: false,
active: true,
dotsEach: 2,
smartSpeed: 1000,
autoplay: 5000,
navText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
responsive: {
0: {
items: 1,
},
575: {
items: 1,
},
768: {
items: 2,
},
992: {
items: 3,
},
1200: {
items: 3,
}
}
});
}
// Scroll to a Specific Div
if ($('.scroll-to-target').length) {
$(".scroll-to-target").on('click', function () {
var target = $(this).attr('data-target');
// animate
$('html, body').animate({
scrollTop: $(target).offset().top
}, 1000);
});
}
$('.testi-image-wrap').slick({
slidesToShow: 3,
slidesToScroll: 1,
asNavFor: '.testi-content-wrap',
dots: false,
focusOnSelect: true,
prevArrow: '<i class="flaticon-left-arrow left"></i>',
nextArrow: '<i class="flaticon-right-arrow right"></i>',
responsive: [
{
breakpoint: 500,
settings: {
slidesToShow: 1,
}
},
]
});
$('.testi-content-wrap').slick({
asNavFor: '.testi-image-wrap',
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
dots: false,
});
$('.testimonial-two-wrap').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
fade: true,
dots: false,
autoplay: true,
prevArrow: '<i class="flaticon-left-arrow left"></i>',
nextArrow: '<i class="flaticon-right-arrow right"></i>',
});
/* ==========================================================================
When document is scroll, do
========================================================================== */
$(window).on('scroll', function () {
headerStyle();
});
/* ==========================================================================
When document is loaded, do
========================================================================== */
$(window).on('load', function () {
handlePreloader();
/*========== Start Portfolio isotop Js ==========*/
// isotop
// init Isotope
var $grid = $('.custom-row').isotope({
itemSelector: '.grid-item',
percentPosition: true,
masonry: {
// use outer width of grid-sizer for columnWidth
columnWidth: 1,
}
});
});
}
}
}
... ...
... ... @@ -26,4 +26,15 @@ const router = VueRouter.createRouter({
routes
});
router.beforeEach(async (to, from, next) => {
$('[top-nav]').removeClass('current');
$('[top-nav="'+to.name+'"]').addClass('current');
// 回到顶部
$('html, body').animate({
scrollTop: 0
}, 500);
next();
})
export default router
... ...
<section class="banner-section rel">
<div class="container">
<h2 class="page-title">关于鸿果科技</h2>
<nav aria-label="breadcrumb">
<!--<nav aria-label="breadcrumb">
<ol class="breadcrumb-list">
<li class="breadcrumb-item"><a href="index.html">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">About</li>
</ol>
</nav>
</nav>-->
<div class="shape shapeAnimationOne l-10 t-60">
<img src="assets/img/shapes/shape1.png" alt="Shape">
... ...
import pageInit from "../../minixs/pageInit.js";
export default {
name: 'home',
template: '',
mixins:[pageInit],
components: {},
props: [],
setup(props, {attrs, slots, emit}) {
... ... @@ -23,295 +25,7 @@ export default {
path:'assets/img/zzzs/5.jpg'
}];
Vue.onMounted(() =>{
// Loading Box (Preloader)
function handlePreloader() {
setTimeout(function (){
if ($('.preloader').length) {
$('.preloader').delay(200).fadeOut(500);
}
},1000);
}
// Header Style and Scroll to Top
function headerStyle() {
if ($('.main-header').length) {
var windowpos = $(window).scrollTop();
var siteHeader = $('.main-header');
var scrollLink = $('.scroll-top');
if (windowpos >= 250) {
siteHeader.addClass('fixed-header');
scrollLink.fadeIn(300);
} else {
siteHeader.removeClass('fixed-header');
scrollLink.fadeOut(300);
}
}
}
headerStyle();
// dropdown menu
var mobileWidth = 991;
var navcollapse = $('.navigation li.dropdown');
$(window).on('resize', function () {
navcollapse.children('ul').hide();
});
navcollapse.hover(function () {
if ($(window).innerWidth() >= mobileWidth) {
$(this).children('ul').stop(true, false, true).slideToggle(300);
$(this).children('.megamenu').stop(true, false, true).slideToggle(300);
}
});
//Submenu Dropdown Toggle
if ($('.navigation li.dropdown ul').length) {
$('.navigation li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-right"></span></div>');
//Dropdown Button
$('.navigation li.dropdown .dropdown-btn').on('click', function () {
$(this).prev('ul').slideToggle(500);
$(this).prev('.megamenu').slideToggle(800);
});
//Disable dropdown parent link
$('.navigation li.dropdown > a').on('click', function (e) {
e.preventDefault();
});
}
//Submenu Dropdown Toggle
if ($('.main-header .main-menu').length) {
$('.main-header .main-menu .navbar-toggle').on('click', function () {
$(this).prev().prev().next().next().children('li.dropdown').hide();
});
}
// End Main menu
new WOW().init();
/* Fact Counter + Text Count */
if ($('.success-box').length) {
$('.success-box').appear(function () {
var $t = $(this),
n = $t.find(".count-text").attr("data-stop"),
r = parseInt($t.find(".count-text").attr("data-speed"), 10);
if (!$t.hasClass("counted")) {
$t.addClass("counted");
$({
countNum: $t.find(".count-text").text()
}).animate({
countNum: n
}, {
duration: r,
easing: "linear",
step: function () {
$t.find(".count-text").text(Math.floor(this.countNum));
},
complete: function () {
$t.find(".count-text").text(this.countNum);
}
});
}
}, {
accY: 0
});
}
/*========== Start Portfolio isotop Js ==========*/
// isotop
// init Isotope
var $grid = $('.custom-row').isotope({
itemSelector: '.grid-item',
percentPosition: true,
masonry: {
// use outer width of grid-sizer for columnWidth
columnWidth: 1,
}
});
// magnificPopup
if ($('.projects-popup-link').length) {
$('.projects-popup-link').magnificPopup({
type: 'image',
gallery: {
enabled: true
},
});
}
/*============================== start video element ========================================*/
// magnificPopup start
$('.vedio-play').magnificPopup({
type: 'video',
});
// magnificPopup end
//service-carousel
if ($('.service-carousel').length) {
$('.service-carousel').owlCarousel({
loop: true,
items: 3,
margin: 20,
nav: false,
dots: true,
active: true,
dotsEach: 2,
smartSpeed: 1000,
autoplay: 5000,
responsive: {
0: {
items: 1,
},
575: {
items: 1,
},
768: {
items: 2,
},
992: {
items: 3,
},
1200: {
items: 3,
}
}
});
}
//team-carousel
if ($('.team-carousel').length) {
$('.team-carousel').owlCarousel({
loop: true,
items: 3,
margin: 20,
nav: true,
dots: false,
active: true,
dotsEach: 2,
smartSpeed: 1000,
autoplay: 5000,
navText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
responsive: {
0: {
items: 1,
},
575: {
items: 1,
},
768: {
items: 2,
},
992: {
items: 3,
},
1200: {
items: 3,
}
}
});
}
// Scroll to a Specific Div
if ($('.scroll-to-target').length) {
$(".scroll-to-target").on('click', function () {
var target = $(this).attr('data-target');
// animate
$('html, body').animate({
scrollTop: $(target).offset().top
}, 1000);
});
}
$('.testi-image-wrap').slick({
slidesToShow: 3,
slidesToScroll: 1,
asNavFor: '.testi-content-wrap',
dots: false,
focusOnSelect: true,
prevArrow: '<i class="flaticon-left-arrow left"></i>',
nextArrow: '<i class="flaticon-right-arrow right"></i>',
responsive: [
{
breakpoint: 500,
settings: {
slidesToShow: 1,
}
},
]
});
$('.testi-content-wrap').slick({
asNavFor: '.testi-image-wrap',
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
dots: false,
});
$('.testimonial-two-wrap').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
fade: true,
dots: false,
autoplay: true,
prevArrow: '<i class="flaticon-left-arrow left"></i>',
nextArrow: '<i class="flaticon-right-arrow right"></i>',
});
/* ==========================================================================
When document is scroll, do
========================================================================== */
$(window).on('scroll', function () {
headerStyle();
});
/* ==========================================================================
When document is loaded, do
========================================================================== */
$(window).on('load', function () {
handlePreloader();
/*========== Start Portfolio isotop Js ==========*/
// isotop
// init Isotope
var $grid = $('.custom-row').isotope({
itemSelector: '.grid-item',
percentPosition: true,
masonry: {
// use outer width of grid-sizer for columnWidth
columnWidth: 1,
}
});
});
})
Vue.onMounted(() =>{})
return {
... ...
import pageInit from "../../minixs/pageInit.js";
export default {
name: 'home',
template: '',
mixins:[pageInit],
components: {},
props: [],
setup(props, {attrs, slots, emit}) {
... ...
import pageInit from "../../minixs/pageInit.js";
export default {
name: 'home',
template: '',
mixins:[pageInit],
components: {},
props: [],
setup(props, {attrs, slots, emit}) {
... ... @@ -90,47 +92,8 @@ export default {
])
// 挂载完
Vue.onMounted(() => {
$('.team-carousel').owlCarousel({
loop:true,
items: 1,
margin: 20,
nav: false,
dots: false,
active: true,
dotsEach: 2,
smartSpeed: 1000,
autoplay: 5000,
// navText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
// dotsData: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
responsive: {
/* 0: {
items: 1,
},
575: {
items: 1,
},
768: {
items: 2,
},
992: {
items: 3,
},
1200: {
items: 3,
}*/
}
});
//lsq 导航高亮样式对应路由
let hashUr=location.hash;
let href=$('.navigation li a').attr('href');
$('.navigation li').unbind('click.li').on('click.li',function (){
if(hashUr==href){
$('.navigation li').removeClass('current');
$(this).addClass('current')
}
})
})
Vue.onMounted(() => {})
return{
isHover,
tooltipHover,
... ...
import pageInit from "../../minixs/pageInit.js";
export default {
name: 'services',
template: '',
mixins:[pageInit],
components: {},
props: [],
setup(props, {attrs, slots, emit}) {
... ...