Commit 9b5ac1ca658f22c3fa175000637d41314df224e6
1 parent
dce67cb7
分销小店 分类没有更多
Showing
2 changed files
with
26 additions
and
22 deletions
packageC/pages/goods/distributionCategoryList/index.js
... | ... | @@ -250,8 +250,7 @@ Page({ |
250 | 250 | |
251 | 251 | //获取分类 |
252 | 252 | async getGoodsCategoris() { |
253 | - // if(this.data.is_no_more)return false; | |
254 | - // if(this.data.isLoading)return false; | |
253 | + | |
255 | 254 | let { currentData } = this.data; |
256 | 255 | let Plurl = `/api/weshop/users/distribut/listmyshopCat`; |
257 | 256 | const categoris = await e.promiseGet(Plurl, { |
... | ... | @@ -385,8 +384,6 @@ Page({ |
385 | 384 | arr.push(ob); |
386 | 385 | } |
387 | 386 | |
388 | - | |
389 | - | |
390 | 387 | s.setData({ groups: arr }); |
391 | 388 | //console.log(s.data.groups) |
392 | 389 | } |
... | ... | @@ -599,6 +596,12 @@ Page({ |
599 | 596 | get_next_cate(index) { |
600 | 597 | if(this.data.isLoading) return false; |
601 | 598 | index = index + 1; |
599 | + if(index==this.data.catelist.length){ | |
600 | + this.setData({ | |
601 | + is_none:1 | |
602 | + }) | |
603 | + return false; | |
604 | + } | |
602 | 605 | let nex_cat_id = this.data.catelist[index].id; |
603 | 606 | this.setData({ |
604 | 607 | cat_id: nex_cat_id, |
... | ... | @@ -650,23 +653,23 @@ Page({ |
650 | 653 | }, |
651 | 654 | touchend(e) { |
652 | 655 | var th=this; |
653 | - setTimeout(function () { | |
656 | + let {select_classify_on}=th.data; | |
657 | + setTimeout(function () { | |
654 | 658 | if(!th.data.car_scroll){ |
655 | - clearInterval(th.data.timer); | |
656 | - th.get_next_cate(th.data.select_classify_on); | |
659 | + console.log('df'); | |
660 | + th.get_next_cate(select_classify_on); | |
657 | 661 | return false; |
658 | 662 | } |
659 | 663 | |
660 | 664 | if(!startY) return false; |
661 | 665 | endY = e.changedTouches[0].clientY; |
662 | 666 | moveDistance = startY - endY; |
663 | - if(moveDistance<0){ | |
667 | + if(moveDistance<=0){ | |
664 | 668 | isReachBt=0; |
665 | 669 | return false; |
666 | 670 | } |
667 | 671 | if (th.data.is_no_more && moveDistance >= 10 && isReachBt > 0) { |
668 | - clearInterval(th.data.timer); | |
669 | - th.get_next_cate(th.data.select_classify_on); | |
672 | + th.get_next_cate(select_classify_on); | |
670 | 673 | } |
671 | 674 | },50) |
672 | 675 | ... | ... |
packageC/pages/goods/distributionCategoryList/index.wxml
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | <view class="search-img left"> |
13 | 13 | <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> |
14 | 14 | </view> |
15 | - <input class="search-cont" autoFocus bindconfirm="search" bindinput="getInput" placeholder="请输入您所搜索的商品" type="text"></input> | |
15 | + <input class="search-cont" bindconfirm="search" bindinput="getInput" placeholder="请输入您所搜索的商品" type="text"></input> | |
16 | 16 | </view> |
17 | 17 | <view class="c-red fs26" bindtap="search">搜索</view> |
18 | 18 | </view> |
... | ... | @@ -95,10 +95,8 @@ |
95 | 95 | <!-- 显示商品列表开始 --> |
96 | 96 | <!-- <view class="classify_content-frame flex-wrap" style="width:100%;overflow:hidden;heigth:100%;"> --> |
97 | 97 | <!-- <view class="null" style="width:100%;margin-top:70rpx;"></view> --> |
98 | - <scroll-view wx:if="{{is_get}}" scroll-y scroll-top="{{scrollTop}}" | |
99 | - bindscroll="bd_scroll" | |
100 | - bindtouchstart="touchstart" bindtouchend="touchend" bindscrolltolower='scrollLower' lower-threshold="200" style="height:{{windowHeight}};position:absolute;margin-top:70rpx;top:140rpx;bottom:0;rigth:0;left:26%;width:73%;"> | |
101 | - <!--<view class="null" style="width:100%;height:1px;"></view>--> | |
98 | + <scroll-view wx:if="{{is_get}}" scroll-y scroll-top="{{scrollTop}}" bindscroll="bd_scroll" bindtouchstart="touchstart" bindtouchend="touchend" bindscrolltolower='scrollLower' lower-threshold="200" style="height:{{windowHeight}};position:absolute;margin-top:70rpx;top:140rpx;bottom:0;rigth:0;left:26%;width:73%;"> | |
99 | + <!-- <view class="null" style="width:100%;height:1px;"></view> --> | |
102 | 100 | <!-- goodslist --> |
103 | 101 | <view class="choice_list" style="height:{{requestData.length?'100%':''}}"> |
104 | 102 | <navigator class="choice_item" style="margin-bottom:{{dataLength -1 == index?'100px':'0'}}" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" data-id="{{item.id}}"> |
... | ... | @@ -118,10 +116,10 @@ |
118 | 116 | <view class="comment flex jc_sb"> |
119 | 117 | <view class="word-line xc-ash">¥{{item.market_price}}</view> |
120 | 118 | </view> |
121 | - <view class="fs24 c-a flex jc_sb"> | |
122 | - <text class="money c-red">分成金额:{{filter.toFix(item.commission,2)}}</text> | |
123 | - <text>评论{{item.comment_count}}</text> | |
124 | - </view> | |
119 | + <view class="fs24 c-a flex jc_sb"> | |
120 | + <text class="money c-red">分成金额:{{filter.toFix(item.commission,2)}}</text> | |
121 | + <text>评论{{item.comment_count}}</text> | |
122 | + </view> | |
125 | 123 | </block> |
126 | 124 | <block wx:else> |
127 | 125 | <!-- 商品价格,先判断下是否有等级价 --> |
... | ... | @@ -151,7 +149,7 @@ |
151 | 149 | <view class="word-line xc-ash">¥{{item.market_price}}</view> |
152 | 150 | </view> |
153 | 151 | <view class="fs24 c-a flex jc_sb"> |
154 | - <text class="c-red">分成金额:{{filter.toFix(item.commission,2)}}</text> | |
152 | + <text class="c-red">分成金额:{{filter.toFix(item.commission,2)}}</text> | |
155 | 153 | <text>评论{{item.comment_count}}</text> |
156 | 154 | </view> |
157 | 155 | </block> |
... | ... | @@ -174,7 +172,7 @@ |
174 | 172 | </view> |
175 | 173 | </view> |
176 | 174 | <view class="fs24 c-a flex jc_sb"> |
177 | - <text class="c-red">分成金额:{{filter.toFix(item.commission,2)}}</text> | |
175 | + <text class="c-red">分成金额:{{filter.toFix(item.commission,2)}}</text> | |
178 | 176 | <text>评论{{item.comment_count}}</text> |
179 | 177 | </view> |
180 | 178 | </block> |
... | ... | @@ -206,10 +204,13 @@ |
206 | 204 | </view> |
207 | 205 | </navigator> |
208 | 206 | <!-- 暂无更多 --> |
209 | - <view id="morelb" wx:if="{{is_no_more&&!is_none&&requestData.length}}" style="color:c-red; height: 60rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;"> | |
207 | + <view id="morelb" wx:if="{{is_no_more&&!is_none&&requestData.length}}" style="color:c-red; height: 60rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;"> | |
210 | 208 | <text style="font-size:32rpx;color:red;margin-right:10rpx" class="iconfont icon-arrowup"></text> |
211 | 209 | <text style="color:#999">向上拉继续浏览下一个类别</text> |
210 | + | |
212 | 211 | </view> |
212 | + <view wx:if="{{is_none}}" style="color:#999; height: 60rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;">没有更多了</view> | |
213 | + | |
213 | 214 | </view> |
214 | 215 | <view class="no-data" wx:if="{{requestData.length==0}}"> |
215 | 216 | <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> --> | ... | ... |