Authored by 梁志锋

update

... ... @@ -11,7 +11,8 @@ var $ = require('jquery'),
var $authorIntro = $('.author .intro');
var isIphone = navigator.userAgent.indexOf('iPhone') > 0 ? true : false;
var isEzinPage = false,
isIphone = navigator.userAgent.indexOf('iPhone') > 0 ? true : false;
var hasCollocationBlock = $('.collocation-block').length > 0 ? true : false;
... ... @@ -41,7 +42,7 @@ function posCollocationArrow($curCo) {
backgroundPosition: bgPos + ' bottom'
});
if (isIphone) {
if (isIphone && !isEzinPage) {
$fixedThumbContainer.css({
backgroundPosition: bgPos + ' bottom'
});
... ... @@ -61,7 +62,7 @@ function thumbTouchEvt(e) {
$thumbs.filter('.focus').removeClass('focus');
if (isIphone) {
if (isIphone && !isEzinPage) {
if ($curCo.closest('.fixed-thumb-container').length > 0) {
$brother = $thumbContainer;
} else {
... ... @@ -85,7 +86,7 @@ function thumbTouchEvt(e) {
//
lazyLoad($curProds.find('.lazy'));
if (isIphone) {
if (isIphone && !isEzinPage) {
if (myScroll) {
myScroll.scrollToElement(scrollToEl, 400);
}
... ... @@ -98,7 +99,7 @@ function thumbTouchEvt(e) {
myScroll && myScroll.refresh();
}
if (isIphone) {
if (isIphone && !isEzinPage) {
if ($('.yoho-header').length > 0) {
$('#wrapper').addClass('ios has-head');
} else {
... ... @@ -145,18 +146,27 @@ if (hasCollocationBlock) {
$thumbContainer.delegate('.thumb', 'touchend', thumbTouchEvt);
if (isIphone) {
if (isIphone && !isEzinPage) {
$fixedThumbContainer.delegate('.thumb', 'touchend', thumbTouchEvt);
}
}
/**
* 初始化页面参数
*/
exports.init = function (flag) {
if (flag === true) {
isEzinPage = true;
}
};
// 初始化iscroll
window.onload = function() {
var $scroller = $('#scroller');
var winH, tcH, cbH, cbTop, fixedThumbDom;
if (!isIphone) {
if (!isIphone || isEzinPage) {
return;
}
... ...