...
|
...
|
@@ -832,6 +832,226 @@ function actionTopLogoAnimate() { |
|
|
window.setTimeout(fadeAnimate, 3000);
|
|
|
}
|
|
|
}
|
|
|
window.newArr = [];
|
|
|
window.wrapperindex = 0;
|
|
|
window.gindex = 0;
|
|
|
window.targetArr1 = [];
|
|
|
window.targetArr2 = [];
|
|
|
window.targetArr3 = [];
|
|
|
window.oh1 = 0;
|
|
|
window.oh2 = 0;
|
|
|
window.oh3 = 0;
|
|
|
window.valueIndex = 0;
|
|
|
window.nowIndex = 0;
|
|
|
window.inner1 = '';
|
|
|
window.inner2 = '';
|
|
|
window.inner3 = '';
|
|
|
window.finalresult = '';
|
|
|
|
|
|
function createNewArray(obj) {
|
|
|
var $thirdnavpanel = $(obj);
|
|
|
|
|
|
$thirdnavpanel.find('.thirdnavbar').each(function() {
|
|
|
var $that = $(this);
|
|
|
var $alink = $that.find('a');
|
|
|
var _href = $alink.attr('href');
|
|
|
var hottag = $alink.attr('hot') === 'true' ? true : false;
|
|
|
var objt = {};
|
|
|
|
|
|
if ($that.hasClass('category-title')) {
|
|
|
objt = {
|
|
|
type: 'title',
|
|
|
height: 49,
|
|
|
content: $that.text(),
|
|
|
index: window.valueIndex,
|
|
|
href: _href,
|
|
|
hot: false
|
|
|
};
|
|
|
} else {
|
|
|
objt = {
|
|
|
type: 'catlist',
|
|
|
height: 36,
|
|
|
content: $alink.text(),
|
|
|
index: window.valueIndex,
|
|
|
href: _href,
|
|
|
hot: hottag
|
|
|
};
|
|
|
}
|
|
|
window.valueIndex++;
|
|
|
window.newArr.push(objt);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function createWrapper() {
|
|
|
var arrlength = window.newArr.length;
|
|
|
var i = 0;
|
|
|
var objnew = [];
|
|
|
var aobj = [];
|
|
|
var bobj = [];
|
|
|
var cobj = [];
|
|
|
var final1 = '',
|
|
|
final2 = '',
|
|
|
final3 = '';
|
|
|
var a = 0;
|
|
|
var b = 0;
|
|
|
var c = 0;
|
|
|
|
|
|
for (i; i < arrlength; i++) {
|
|
|
objnew = window.newArr[i];
|
|
|
if (window.gindex === 0) {
|
|
|
window.oh1 = (window.oh1 + objnew.height);
|
|
|
if (window.oh1 >= 340 && i !== (arrlength - 1)) {
|
|
|
window.targetArr1 = window.newArr.slice(0, objnew.index + 1);
|
|
|
window.nowIndex = objnew.index + 1;
|
|
|
window.gindex++;
|
|
|
}
|
|
|
if (i === (arrlength - 1)) {
|
|
|
window.targetArr1 = window.newArr.slice(0, arrlength + 1);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if (window.gindex === 1) {
|
|
|
window.oh2 = (window.oh2 + objnew.height);
|
|
|
if (window.oh2 >= 340 && i !== (arrlength - 1)) {
|
|
|
window.targetArr2 = window.newArr.slice(window.nowIndex, objnew.index + 1);
|
|
|
window.nowIndex = objnew.index + 1;
|
|
|
window.gindex++;
|
|
|
}
|
|
|
if (i === (arrlength - 1)) {
|
|
|
window.targetArr2 = window.newArr.slice(window.nowIndex, arrlength + 1);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if (window.gindex === 2) {
|
|
|
window.oh3 = (window.oh3 + objnew.height);
|
|
|
if (window.oh3 >= 340 && i !== (arrlength - 1)) {
|
|
|
window.targetArr3 = window.newArr.slice(window.nowIndex, objnew.index + 1);
|
|
|
window.nowIndex = objnew.index + 1;
|
|
|
window.gindex++;
|
|
|
break;
|
|
|
}
|
|
|
if (i === (arrlength - 1)) {
|
|
|
window.targetArr3 = window.newArr.slice(window.nowIndex, arrlength + 1);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
for (a; a < window.targetArr1.length; a++) {
|
|
|
aobj = window.targetArr1[a] || {};
|
|
|
if (aobj.type === 'title') {
|
|
|
window.inner1 = window.inner1 +
|
|
|
'<li class="cattitle"><h3><a href="' +
|
|
|
aobj.href +
|
|
|
'">' +
|
|
|
aobj.content +
|
|
|
'</a></h3></li>';
|
|
|
} else {
|
|
|
if (aobj.hot === true) {
|
|
|
window.inner1 = window.inner1 +
|
|
|
'<li class="catdetail"><a class="thirdcatelink hot" href="' +
|
|
|
aobj.href +
|
|
|
'">' +
|
|
|
aobj.content +
|
|
|
'</a></li>';
|
|
|
} else {
|
|
|
window.inner1 = window.inner1 +
|
|
|
'<li class="catdetail"><a class="thirdcatelink" href="' +
|
|
|
aobj.href + '">' +
|
|
|
aobj.content +
|
|
|
'</a></li>';
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
for (b; b < window.targetArr2.length; b++) {
|
|
|
bobj = window.targetArr2[b] || {};
|
|
|
if (bobj.type === 'title') {
|
|
|
window.inner2 = (window.inner2 +
|
|
|
'<li class="cattitle"><h3><a href="' +
|
|
|
bobj.href + '">' +
|
|
|
bobj.content +
|
|
|
'</a></h3></li>');
|
|
|
} else {
|
|
|
if (bobj.hot === true) {
|
|
|
window.inner2 = (window.inner2 +
|
|
|
'<li class="catdetail"><a class="thirdcatelink hot" href="' +
|
|
|
bobj.href + '">' + bobj.content + '</a></li>');
|
|
|
} else {
|
|
|
window.inner2 = (window.inner2 +
|
|
|
'<li class="catdetail"><a class="thirdcatelink" href="' +
|
|
|
bobj.href + '">' + bobj.content + '</a></li>');
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
for (c; c < window.targetArr3.length; c++) {
|
|
|
cobj = window.targetArr3[c] || {};
|
|
|
if (cobj.type === 'title') {
|
|
|
window.inner3 = (window.inner3 +
|
|
|
'<li class="cattitle"><h3><a href="' +
|
|
|
cobj.href +
|
|
|
'">' +
|
|
|
cobj.content +
|
|
|
'</a></h3></li>');
|
|
|
} else {
|
|
|
if (cobj.hot === true) {
|
|
|
window.inner3 = (window.inner3 +
|
|
|
'<li class="catdetail"><a class="thirdcatelink hot" href="' +
|
|
|
cobj.href + '">' +
|
|
|
cobj.content +
|
|
|
'</a></li>');
|
|
|
} else {
|
|
|
window.inner3 = (window.inner3 +
|
|
|
'<li class="catdetail"><a class="thirdcatelink" href="' +
|
|
|
cobj.href + '">' +
|
|
|
cobj.content +
|
|
|
'</a></li>');
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
if (window.inner1 !== '') {
|
|
|
final1 = '<ul class="cate_row1 cate_row">' +
|
|
|
window.inner1 +
|
|
|
'</ul>';
|
|
|
}
|
|
|
if (window.inner2 !== '') {
|
|
|
final2 = '<ul class="cate_row2 cate_row">' +
|
|
|
window.inner2 +
|
|
|
'</ul>';
|
|
|
}
|
|
|
if (window.inner3 !== '') {
|
|
|
final3 = '<ul class="cate_row3 cate_row">' +
|
|
|
window.inner3 +
|
|
|
'</ul>';
|
|
|
}
|
|
|
window.finalresult = final1 + final2 + final3;
|
|
|
$('#' + window.wrapperindex).empty().append(window.finalresult);
|
|
|
}
|
|
|
|
|
|
function actionNav() {
|
|
|
$('.categorywrapper').each(function(index) {
|
|
|
window.wrapperindex = $(this).attr('id');
|
|
|
window.newArr = [];
|
|
|
window.gindex = 0;
|
|
|
window.targetArr1 = [];
|
|
|
window.targetArr2 = [];
|
|
|
window.targetArr3 = [];
|
|
|
window.oh1 = 0;
|
|
|
window.oh2 = 0;
|
|
|
window.oh3 = 0;
|
|
|
window.valueIndex = 0;
|
|
|
window.nowIndex = 0;
|
|
|
window.inner1 = '';
|
|
|
window.inner2 = '';
|
|
|
window.inner3 = '';
|
|
|
createNewArray($(this).find('.category'));
|
|
|
createWrapper();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 查询跳转后保留关键字
|
|
|
* @return {[type]} [description]
|
...
|
...
|
@@ -1435,6 +1655,7 @@ function actionLoginInfo() { |
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function init() {
|
|
|
actionNav(); //处理导航
|
|
|
actionExeTemplate(); //处理模板
|
|
|
actionInitCookie(); //初始化cookie
|
|
|
actionExeCookieMap(); //格式化cookie
|
...
|
...
|
|