From dae4e63510683f0b3b753783849e2b130c064742 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Wed, 14 Sep 2022 08:57:40 +0800 Subject: [PATCH] OA单分类优化 --- pages/goods/categoryList/categoryList.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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']) } }, -- libgit2 0.21.4