diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index 2e7ef4d..991fd14 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -60,7 +60,7 @@ Page({ is_hot: 0, msgStatus:false, //页面显示暂无数据状态 countDownNum: 3, - timer: '', //定时器 + timer: null, //定时器 lastMsg:false, toView:"", is_show_class:false,//是否添加新样式 @@ -706,9 +706,8 @@ Page({ // 新的版本分类点击一级分类 click_classify:function(e){ // 在风格三的时候,才会有current - this.setData({ - countDownNum: 3, - }); + clearInterval(this.data.timer); + let cur = e.currentTarget.dataset.current; if(cur) { if (this.data.currentTab == cur) { @@ -745,7 +744,7 @@ Page({ } this.setData({ one_level_classify: arr2}); //this.data.one_level_classify[e.currentTarget.dataset.index]['items']['is_show_class'] = true - console.log(e.currentTarget.dataset.index) + // console.log(e.currentTarget.dataset.index) clearInterval(this.data.timer); this.setData({ countDownNum: 3, stylePage: 1, scrollTop: 0}); this.data.ishaf_three = 0;