Authored by 郭成尧

Merge branch 'release/4.4' of http://git.dev.yoho.cn/web/yohobuywap into release/4.4

... ... @@ -36,11 +36,9 @@ class SearchData
// return 'http://101.200.31.165/yohosearch/search.json';
return 'http://192.168.10.64:8080/yohosearch/search.json';
case 'test':
return 'http://192.168.102.216:8087/yohosearch/search.json';
// return 'http://10.66.100.4:8080/yohosearch/search.json';
return 'http://testing.yohoops.org/yohosearch/search.json';
case 'developer':
default:
// return 'http://10.66.100.4:8080/yohosearch/search.json';//腾讯云测试环境
return 'http://192.168.102.216:8087/yohosearch/search.json';
}
}
... ...
... ... @@ -350,11 +350,20 @@ function search(opt) {
return;
}
//导航类别
if ($pre.hasClass('new')) {
navType = 'newest';
} else if ($pre.hasClass('price')) {
navType = 'price';
} else if ($pre.hasClass('discount')) {
navType = 'discount';
}
if (opt) {
//筛选项变更则重置reload为true
for (att in navInfo) {
if (navInfo.hasOwnProperty(att)) {
if (navInfo.hasOwnProperty(att) && navType !== att) {
navInfo[att].reload = true;
}
}
... ... @@ -405,14 +414,6 @@ function search(opt) {
$.extend(defaultOpt, ext); //扩展筛选项
}
//导航类别
if ($pre.hasClass('new')) {
navType = 'newest';
} else if ($pre.hasClass('price')) {
navType = 'price';
} else if ($pre.hasClass('discount')) {
navType = 'discount';
}
nav = navInfo[navType];
... ... @@ -634,6 +635,8 @@ $subNav.on('touchend touchcancel', function(e) {
function scrollHandler() {
sTop = -myScroll.y;
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
myScroll && myScroll.refresh();
if (sTop + winH > $('#scroller').height() - 0.25 * $goodsContainer.height() - 50) {
... ... @@ -770,7 +773,6 @@ function cancelShop() {
$('#collect').on('touchstart', function(e) {
if ($('#collect').hasClass('alreadyCollect')) {
console.log(1)
cancelShop();
} else {
collectShop();
... ...