Commit 3c0b60cb4e98ce13081b218d7dac9a9d9257a581
Merge branch 'qa' into 'master'
Qa See merge request !454
Showing
2 changed files
with
19 additions
and
17 deletions
pages/goods/categoryList/categoryList.js
... | ... | @@ -614,23 +614,25 @@ Page({ |
614 | 614 | |
615 | 615 | // 新的版本分类点击一级分类 |
616 | 616 | click_classify:function(e){ |
617 | + // 在风格三的时候,才会有current | |
617 | 618 | let cur = e.currentTarget.dataset.current; |
618 | - if (this.data.currentTab == cur ) { | |
619 | - if(this.data.select_classify_on!=220&&this.data.select_classify_on!=223) { | |
620 | - return false; | |
621 | - } | |
622 | - else if(cur!=0){ | |
623 | - return false; | |
624 | - } | |
625 | - } else { | |
626 | - wx.pageScrollTo({ | |
627 | - scrollTop: 0 | |
628 | - }) | |
629 | - this.setData({ | |
630 | - currentTab: cur, | |
631 | - select_classify_on:cur | |
632 | - }) | |
633 | - this.checkCor(); | |
619 | + if(cur) { | |
620 | + if (this.data.currentTab == cur) { | |
621 | + if (this.data.select_classify_on != 220 && this.data.select_classify_on != 223) { | |
622 | + return false; | |
623 | + } else if (cur != 0) { | |
624 | + return false; | |
625 | + } | |
626 | + } else { | |
627 | + wx.pageScrollTo({ | |
628 | + scrollTop: 0 | |
629 | + }) | |
630 | + this.setData({ | |
631 | + currentTab: cur, | |
632 | + select_classify_on: cur | |
633 | + }) | |
634 | + this.checkCor(); | |
635 | + } | |
634 | 636 | } |
635 | 637 | // if(e.currentTarget.dataset.index == 223){ |
636 | 638 | // this.setData({ status_show: 1}); | ... | ... |
pages/goods/categoryList/categoryList.wxml
... | ... | @@ -143,7 +143,7 @@ |
143 | 143 | <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> |
144 | 144 | <!-- 添加左边红色条 --> |
145 | 145 | <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> |
146 | - <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} fs30 t-c {{select_classify_on==index&&ittms.items.name.length==2?'text-indent':''}} {{select_classify_on==index&&ittms.items.name.length==3?'text3':''}}"data-index="{{index}}"data-name="{{ittms.items.mobile_name}}"> | |
146 | + <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} fs30 t-c {{select_classify_on==index&&ittms.items.name.length==2?'':''}} {{select_classify_on==index&&ittms.items.name.length==3?'':''}}"data-index="{{index}}"data-name="{{ittms.items.mobile_name}}"> | |
147 | 147 | |
148 | 148 | <view class="tab-bar-item sort-name ellipsis-1">{{ittms.items.name}}</view> |
149 | 149 | </view> | ... | ... |