diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index f4a931e..c970523 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -749,10 +749,12 @@ Page({ click_classify: function (e) { // 在风格三的时候,才会有current clearInterval(this.data.timer); + console.log('类别切换---------------'); this.setData({ toupper:true }) let cur = e.currentTarget.dataset.current; + console.log(cur); if (cur) { if (this.data.currentTab == cur) { if (this.data.select_classify_on != 220 && this.data.select_classify_on != 221 && this.data.select_classify_on != 223) { @@ -945,7 +947,9 @@ Page({ console.log(eClientY - sClientY); if (eClientY - sClientY > 0) { console.log('下滑'); + console.log(this.data.toupper); if (this.data.toupper) { + console.log('下滑请求数据'); this.setData({msgStatus:false,is_no_more:false}) clearInterval(this.data.timer); this.nextCategory(true) @@ -954,9 +958,11 @@ Page({ } }else{ console.log('上滑'); - this.setData({ - toupper:false - }) + if (!this.data.msgStatus) { + this.setData({ + toupper:false + }) + } this.disNexCat() } }, @@ -1126,7 +1132,7 @@ Page({ dataArray[index + s]['items']['is_show_class'] = true console.log(dataArray[index + s]['items']) this.setData({ - msgStatus: false, + msgStatus: true, stylePage: 1, index: index + s, select_classify_on: index + s, @@ -1135,7 +1141,7 @@ Page({ one_level_classify: dataArray, is_no_more: 0 }); - this.style(this.data.stylePage, dataArray[index + 1]['items']['id']) + this.style(this.data.stylePage, dataArray[index + s]['items']['id']) } },