From f824edb8e1fe1491341b9aeca35c480a53276f56 Mon Sep 17 00:00:00 2001 From: taiwan Date: Mon, 24 Jan 2022 16:41:53 +0800 Subject: [PATCH] 分类 --- pages/goods/categoryList/categoryList.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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; -- libgit2 0.21.4