...
|
...
|
@@ -6,6 +6,7 @@ |
|
|
window.tmp$ = null;
|
|
|
var $ = require('jquery');
|
|
|
window.tmp$ = $;
|
|
|
<<<<<<< HEAD
|
|
|
var Swiper = require("yoho.swiper");
|
|
|
require('./plugin/lazyloadImage');
|
|
|
$(".lazy").lazyload();
|
...
|
...
|
@@ -26,6 +27,13 @@ $.fn.left = function() { |
|
|
return parseFloat($(this).css("left").replace("px", ""));
|
|
|
}
|
|
|
};
|
|
|
=======
|
|
|
require("lazyload");
|
|
|
var Swiper = require("yoho-idangerous.swiper");
|
|
|
$(".lazy").lazyload();
|
|
|
|
|
|
//扩展jquery=================================================================
|
|
|
>>>>>>> ww_develop
|
|
|
$.fn.id = function() {
|
|
|
if (arguments.length > 0) {
|
|
|
$(this).attr("id", arguments[0]);
|
...
|
...
|
@@ -38,12 +46,21 @@ $.fn.id = function() { |
|
|
//banner========================================================================================================
|
|
|
if ($(".swiper-container").find(".swiper-slide").length > 1) {
|
|
|
var mySwiper = new Swiper('.swiper-container', {
|
|
|
<<<<<<< HEAD
|
|
|
pagination: '.pagination-banner',
|
|
|
loop: true,
|
|
|
autoplay: 5000,
|
|
|
grabCursor: true,
|
|
|
paginationClickable: true,
|
|
|
autoStopPlay: false
|
|
|
=======
|
|
|
pagination : '.pagination-banner',
|
|
|
loop : true,
|
|
|
autoplay : 5000,
|
|
|
grabCursor : true,
|
|
|
paginationClickable : true,
|
|
|
autoStopPlay : false
|
|
|
>>>>>>> ww_develop
|
|
|
});
|
|
|
$('.arrow-left').on('click', function(e) {
|
|
|
e.preventDefault();
|
...
|
...
|
@@ -57,6 +74,23 @@ if ($(".swiper-container").find(".swiper-slide").length > 1) { |
|
|
|
|
|
//==============================================================================================================
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
=======
|
|
|
//centerbanner=============================================================================
|
|
|
var bannerSwiper = new Swiper('.swiper-container2', {
|
|
|
pagination : '.pagination-adv',
|
|
|
loop : true,
|
|
|
autoplay : 2000,
|
|
|
autoStopPlay : false,
|
|
|
paginationClickable : true,
|
|
|
onSlideChangeEnd : function() {
|
|
|
bannerSwiper.startAutoplay();
|
|
|
$(".swiper-container2 .lazy").lazyload();
|
|
|
}
|
|
|
});
|
|
|
//================================================================================================
|
|
|
|
|
|
>>>>>>> ww_develop
|
|
|
$(".getapp").hover(function() {
|
|
|
$(this).find(".bitmap").show();
|
|
|
$("img").lazyload();
|
...
|
...
|
@@ -79,6 +113,7 @@ $(".li-weixin").mouseover(function() { |
|
|
$(".li-weixin").click(function() {
|
|
|
return false;
|
|
|
});
|
|
|
<<<<<<< HEAD
|
|
|
$("#maxEnterprise").click(function() {
|
|
|
$(".bitmap").hide();
|
|
|
$(".pop").hide();
|
...
|
...
|
@@ -87,10 +122,13 @@ $("#minEnterprise").click(function() { |
|
|
$(".bitmap").hide();
|
|
|
$(".pop").hide();
|
|
|
});
|
|
|
=======
|
|
|
>>>>>>> ww_develop
|
|
|
$(".content").click(function() {
|
|
|
$(".bitmap").hide();
|
|
|
$(".pop").hide();
|
|
|
});
|
|
|
<<<<<<< HEAD
|
|
|
//企业滚动效果======================================================================================================
|
|
|
var minMenuHasShow = false; //小导航是否显示
|
|
|
var isTop = true; //滚动条是否在顶部
|
...
|
...
|
@@ -173,21 +211,33 @@ if (document.body.scrollTop > 0 && isTop === true) { |
|
|
}, 200);
|
|
|
isTop = true;
|
|
|
}
|
|
|
=======
|
|
|
>>>>>>> ww_develop
|
|
|
|
|
|
//回到顶部按钮======================================================================================================
|
|
|
$(".return-to-top").click(function() {
|
|
|
$("html,body").animate({
|
|
|
<<<<<<< HEAD
|
|
|
scrollTop: 0
|
|
|
}, 300, function() {
|
|
|
$(".return-to-top").animate({
|
|
|
"filter": "alpha(opacity=0)",
|
|
|
"-moz-opacity": "0",
|
|
|
opacity: "0"
|
|
|
=======
|
|
|
scrollTop : 0
|
|
|
}, 300, function() {
|
|
|
$(".return-to-top").animate({
|
|
|
"filter" : "alpha(opacity=0)",
|
|
|
"-moz-opacity" : "0",
|
|
|
opacity : "0"
|
|
|
>>>>>>> ww_develop
|
|
|
}, 200);
|
|
|
});
|
|
|
});
|
|
|
//===============================================================================================================
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
|
|
|
|
//子菜单交互========================================================================================================
|
...
|
...
|
@@ -206,6 +256,18 @@ function createSubMenu(info) { |
|
|
//================================================================================================================
|
|
|
|
|
|
|
|
|
=======
|
|
|
//子菜单交互========================================================================================================
|
|
|
function createSubMenu(info) {
|
|
|
var data = {};
|
|
|
data.menun = info.menu;
|
|
|
//大菜单名字
|
|
|
data.submenu = info.submenu;
|
|
|
//子菜单名字
|
|
|
}
|
|
|
|
|
|
//================================================================================================================
|
|
|
>>>>>>> ww_develop
|
|
|
|
|
|
//频道页、首页碎片交互=================================================================================================
|
|
|
//mulLine.init();
|
...
|
...
|
@@ -215,6 +277,7 @@ function dealItems() { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
var totalLineNum = 7; // 7 行
|
|
|
var maxTitleStrNum = 45; // 15个字
|
|
|
var maxDetailStrNum = 66; // 22个字
|
...
|
...
|
@@ -223,6 +286,22 @@ function dealItems() { |
|
|
totalLineNum = 6; // 6 行
|
|
|
maxTitleStrNum = 39; // 13个字
|
|
|
maxDetailStrNum = 54; // 18个字
|
|
|
=======
|
|
|
var totalLineNum = 7;
|
|
|
// 7 行
|
|
|
var maxTitleStrNum = 45;
|
|
|
// 15个字
|
|
|
var maxDetailStrNum = 66;
|
|
|
// 22个字
|
|
|
|
|
|
if (document.body.clientWidth < 1190) {
|
|
|
totalLineNum = 6;
|
|
|
// 6 行
|
|
|
maxTitleStrNum = 39;
|
|
|
// 13个字
|
|
|
maxDetailStrNum = 54;
|
|
|
// 18个字
|
|
|
>>>>>>> ww_develop
|
|
|
}
|
|
|
|
|
|
var titleLineNum = 0;
|
...
|
...
|
@@ -256,6 +335,7 @@ function dealItems() { |
|
|
});
|
|
|
citems = null;
|
|
|
}
|
|
|
<<<<<<< HEAD
|
|
|
|
|
|
// function fillDetail()
|
|
|
// {
|
...
|
...
|
@@ -287,6 +367,24 @@ window.currentWidth = document.body.clientWidth; |
|
|
|
|
|
var isIpad = getBrowType().bIsIpad;
|
|
|
|
|
|
=======
|
|
|
|
|
|
$(function() {
|
|
|
dealItems();
|
|
|
});
|
|
|
|
|
|
window.currentWidth = document.body.clientWidth;
|
|
|
//================================================================================================================
|
|
|
|
|
|
//=================================================================================================================
|
|
|
/*$(window).bind("resize",function(){
|
|
|
fillDetail();
|
|
|
});*/
|
|
|
//=================================================================================================================
|
|
|
|
|
|
var isIpad = getBrowType().bIsIpad;
|
|
|
|
|
|
>>>>>>> ww_develop
|
|
|
if (isIpad === true) {
|
|
|
$(".search-loading-icon").hide();
|
|
|
$(".search-area").width($(".search-area").width() - 43);
|
...
|
...
|
@@ -296,17 +394,29 @@ if (isIpad === true) { |
|
|
$(".search-text").show();
|
|
|
}
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
|
=======
|
|
|
>>>>>>> ww_develop
|
|
|
function getBrowType() {
|
|
|
var info = {};
|
|
|
var sUserAgent = navigator.userAgent.toLowerCase();
|
|
|
info.bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
|
|
|
<<<<<<< HEAD
|
|
|
// info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
|
|
|
// info.bIsMidp = sUserAgent.match(/midp/i) == "midp";
|
|
|
// info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
|
|
|
// info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
|
|
|
// info.bIsAndroid = sUserAgent.match(/android/i) == "android";
|
|
|
// info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
|
|
=======
|
|
|
// info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
|
|
|
// info.bIsMidp = sUserAgent.match(/midp/i) == "midp";
|
|
|
// info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
|
|
|
// info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
|
|
|
// info.bIsAndroid = sUserAgent.match(/android/i) == "android";
|
|
|
// info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
|
|
>>>>>>> ww_develop
|
|
|
// info.bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
|
|
return info;
|
|
|
}
|
...
|
...
|
@@ -319,6 +429,7 @@ if (!isIpad && $(".share").size() > 0) { |
|
|
scrollTop = $(window).scrollTop();
|
|
|
if (shareOffsetTop - scrollTop - navHeight <= 0) {
|
|
|
$(".share").css({
|
|
|
<<<<<<< HEAD
|
|
|
"position": "fixed",
|
|
|
"top": navHeight
|
|
|
});
|
...
|
...
|
@@ -326,11 +437,73 @@ if (!isIpad && $(".share").size() > 0) { |
|
|
$(".share").css({
|
|
|
"position": "absolute",
|
|
|
"top": shareOffsetTop
|
|
|
=======
|
|
|
"position" : "fixed",
|
|
|
"top" : navHeight
|
|
|
});
|
|
|
} else {
|
|
|
$(".share").css({
|
|
|
"position" : "absolute",
|
|
|
"top" : shareOffsetTop
|
|
|
>>>>>>> ww_develop
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
window.scrollWindow = function() {
|
|
|
if (document.body.clientWidth >= 1190) {
|
|
|
//document.body.scrollTop=850;
|
|
|
window.tmp$(window).scrollTop(850);
|
|
|
|
|
|
} else if (document.body.clientWidth < 1190 && document.body.clientWidth > 768) {
|
|
|
window.tmp$(window).scrollTop(700);
|
|
|
|
|
|
} else if (document.body.clientWidth <= 768) {
|
|
|
window.tmp$(window).scrollTop(600);
|
|
|
}
|
|
|
};
|
|
|
=======
|
|
|
//搜索按钮===========================================================================
|
|
|
$(".search-input-box").keypress(function(event) {
|
|
|
var keyCode = event.keyCode;
|
|
|
if (keyCode === 13) {
|
|
|
$("#search-button").trigger("click");
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$("#search-button").click(function(){
|
|
|
if($.trim($(".search-input-box").val())!==""){
|
|
|
document.location=$(this).attr("searchURL")+"?q="+$(".search-input-box").val();
|
|
|
}
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
$(document.body).click(function(){
|
|
|
var target = $(".search-text");
|
|
|
target.find(".search-input-box").hide();
|
|
|
target.find(".home-search-button").hide();
|
|
|
target.find(".search-text-content").show();
|
|
|
target.animate({
|
|
|
width : 120
|
|
|
}, 500);
|
|
|
});
|
|
|
$(".search-text").click(function(){return false;});
|
|
|
$(".search-text").click(function() {
|
|
|
$(this).find(".search-text-content").hide();
|
|
|
$(this).find(".search-input-box").width(150).val("").show();
|
|
|
|
|
|
$(this).animate({
|
|
|
width : 190
|
|
|
}, 500, function() {
|
|
|
$(this).find(".home-search-button").show();
|
|
|
$(this).find(".search-input-box").focus();
|
|
|
});
|
|
|
|
|
|
});
|
|
|
//=================================================================================
|
|
|
|
|
|
window.scrollWindow = function() {
|
|
|
if (document.body.clientWidth >= 1190) {
|
|
|
//document.body.scrollTop=850;
|
...
|
...
|
@@ -342,4 +515,5 @@ window.scrollWindow = function() { |
|
|
} else if (document.body.clientWidth <= 768) {
|
|
|
window.tmp$(window).scrollTop(600);
|
|
|
}
|
|
|
}; |
|
|
\ No newline at end of file |
|
|
};
|
|
|
>>>>>>> ww_develop |
...
|
...
|
|