diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index 100d151..22a2279 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -614,23 +614,25 @@ Page({ // 新的版本分类点击一级分类 click_classify:function(e){ + // 在风格三的时候,才会有current let cur = e.currentTarget.dataset.current; - if (this.data.currentTab == cur ) { - if(this.data.select_classify_on!=220&&this.data.select_classify_on!=223) { - return false; - } - else if(cur!=0){ - return false; - } - } else { - wx.pageScrollTo({ - scrollTop: 0 - }) - this.setData({ - currentTab: cur, - select_classify_on:cur - }) - this.checkCor(); + if(cur) { + if (this.data.currentTab == cur) { + if (this.data.select_classify_on != 220 && this.data.select_classify_on != 223) { + return false; + } else if (cur != 0) { + return false; + } + } else { + wx.pageScrollTo({ + scrollTop: 0 + }) + this.setData({ + currentTab: cur, + select_classify_on: cur + }) + this.checkCor(); + } } // if(e.currentTarget.dataset.index == 223){ // this.setData({ status_show: 1}); diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml index 5b833df..75b89b8 100644 --- a/pages/goods/categoryList/categoryList.wxml +++ b/pages/goods/categoryList/categoryList.wxml @@ -143,7 +143,7 @@ - + {{ittms.items.name}}