diff --git a/packageC/pages/goods/distributionCategoryList/index.js b/packageC/pages/goods/distributionCategoryList/index.js index a00415d..d0f6d6d 100644 --- a/packageC/pages/goods/distributionCategoryList/index.js +++ b/packageC/pages/goods/distributionCategoryList/index.js @@ -250,8 +250,7 @@ Page({ //获取分类 async getGoodsCategoris() { - // if(this.data.is_no_more)return false; - // if(this.data.isLoading)return false; + let { currentData } = this.data; let Plurl = `/api/weshop/users/distribut/listmyshopCat`; const categoris = await e.promiseGet(Plurl, { @@ -385,8 +384,6 @@ Page({ arr.push(ob); } - - s.setData({ groups: arr }); //console.log(s.data.groups) } @@ -599,6 +596,12 @@ Page({ get_next_cate(index) { if(this.data.isLoading) return false; index = index + 1; + if(index==this.data.catelist.length){ + this.setData({ + is_none:1 + }) + return false; + } let nex_cat_id = this.data.catelist[index].id; this.setData({ cat_id: nex_cat_id, @@ -650,23 +653,23 @@ Page({ }, touchend(e) { var th=this; - setTimeout(function () { + let {select_classify_on}=th.data; + setTimeout(function () { if(!th.data.car_scroll){ - clearInterval(th.data.timer); - th.get_next_cate(th.data.select_classify_on); + console.log('df'); + th.get_next_cate(select_classify_on); return false; } if(!startY) return false; endY = e.changedTouches[0].clientY; moveDistance = startY - endY; - if(moveDistance<0){ + if(moveDistance<=0){ isReachBt=0; return false; } if (th.data.is_no_more && moveDistance >= 10 && isReachBt > 0) { - clearInterval(th.data.timer); - th.get_next_cate(th.data.select_classify_on); + th.get_next_cate(select_classify_on); } },50) diff --git a/packageC/pages/goods/distributionCategoryList/index.wxml b/packageC/pages/goods/distributionCategoryList/index.wxml index 77ab9f5..0e31077 100644 --- a/packageC/pages/goods/distributionCategoryList/index.wxml +++ b/packageC/pages/goods/distributionCategoryList/index.wxml @@ -12,7 +12,7 @@ - + 搜索 @@ -95,10 +95,8 @@ - - + + @@ -118,10 +116,10 @@ ¥{{item.market_price}} - - 分成金额:{{filter.toFix(item.commission,2)}} - 评论{{item.comment_count}} - + + 分成金额:{{filter.toFix(item.commission,2)}} + 评论{{item.comment_count}} + @@ -151,7 +149,7 @@ ¥{{item.market_price}} - 分成金额:{{filter.toFix(item.commission,2)}} + 分成金额:{{filter.toFix(item.commission,2)}} 评论{{item.comment_count}} @@ -174,7 +172,7 @@ - 分成金额:{{filter.toFix(item.commission,2)}} + 分成金额:{{filter.toFix(item.commission,2)}} 评论{{item.comment_count}} @@ -206,10 +204,13 @@ - + 向上拉继续浏览下一个类别 + + 没有更多了 +