Commit df9a2e7d8db1cbf228b498fa25ced9a07e929459
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
1 changed file
with
11 additions
and
5 deletions
pages/goods/categoryList/categoryList.js
... | ... | @@ -749,10 +749,12 @@ Page({ |
749 | 749 | click_classify: function (e) { |
750 | 750 | // 在风格三的时候,才会有current |
751 | 751 | clearInterval(this.data.timer); |
752 | + console.log('类别切换---------------'); | |
752 | 753 | this.setData({ |
753 | 754 | toupper:true |
754 | 755 | }) |
755 | 756 | let cur = e.currentTarget.dataset.current; |
757 | + console.log(cur); | |
756 | 758 | if (cur) { |
757 | 759 | if (this.data.currentTab == cur) { |
758 | 760 | if (this.data.select_classify_on != 220 && this.data.select_classify_on != 221 && this.data.select_classify_on != 223) { |
... | ... | @@ -945,7 +947,9 @@ Page({ |
945 | 947 | console.log(eClientY - sClientY); |
946 | 948 | if (eClientY - sClientY > 0) { |
947 | 949 | console.log('下滑'); |
950 | + console.log(this.data.toupper); | |
948 | 951 | if (this.data.toupper) { |
952 | + console.log('下滑请求数据'); | |
949 | 953 | this.setData({msgStatus:false,is_no_more:false}) |
950 | 954 | clearInterval(this.data.timer); |
951 | 955 | this.nextCategory(true) |
... | ... | @@ -954,9 +958,11 @@ Page({ |
954 | 958 | } |
955 | 959 | }else{ |
956 | 960 | console.log('上滑'); |
957 | - this.setData({ | |
958 | - toupper:false | |
959 | - }) | |
961 | + if (!this.data.msgStatus) { | |
962 | + this.setData({ | |
963 | + toupper:false | |
964 | + }) | |
965 | + } | |
960 | 966 | this.disNexCat() |
961 | 967 | } |
962 | 968 | }, |
... | ... | @@ -1126,7 +1132,7 @@ Page({ |
1126 | 1132 | dataArray[index + s]['items']['is_show_class'] = true |
1127 | 1133 | console.log(dataArray[index + s]['items']) |
1128 | 1134 | this.setData({ |
1129 | - msgStatus: false, | |
1135 | + msgStatus: true, | |
1130 | 1136 | stylePage: 1, |
1131 | 1137 | index: index + s, |
1132 | 1138 | select_classify_on: index + s, |
... | ... | @@ -1135,7 +1141,7 @@ Page({ |
1135 | 1141 | one_level_classify: dataArray, |
1136 | 1142 | is_no_more: 0 |
1137 | 1143 | }); |
1138 | - this.style(this.data.stylePage, dataArray[index + 1]['items']['id']) | |
1144 | + this.style(this.data.stylePage, dataArray[index + s]['items']['id']) | |
1139 | 1145 | } |
1140 | 1146 | }, |
1141 | 1147 | ... | ... |