Commit 34774dec5876964d3c6792ead083371a6306fa83
1 parent
87da22e2
注释删除
Showing
2 changed files
with
3 additions
and
22 deletions
custom-tab-bar/index.js
| ... | ... | @@ -107,15 +107,11 @@ Component({ |
| 107 | 107 | fontcolor:data.fontcolor, |
| 108 | 108 | is_custum:1 |
| 109 | 109 | }) |
| 110 | - // console.log('abc=======<<<<<', this.data.list); | |
| 110 | + | |
| 111 | 111 | }, |
| 112 | 112 | |
| 113 | 113 | nav_goto:function(e){ |
| 114 | - // const data = e.currentTarget.dataset | |
| 115 | - // this.setData({ | |
| 116 | - // active: data.index | |
| 117 | - // }) | |
| 118 | - // console.log('active***********<<<<<', this.data.active); | |
| 114 | + | |
| 119 | 115 | var url=e.currentTarget.dataset.url; |
| 120 | 116 | if(!url) return false; |
| 121 | 117 | if(url[0]!='/') url='/'+url; |
| ... | ... | @@ -123,18 +119,7 @@ Component({ |
| 123 | 119 | getApp().goto(url); |
| 124 | 120 | }, |
| 125 | 121 | |
| 126 | - | |
| 127 | - // switchTab(e) { | |
| 128 | - // const data = e.currentTarget.dataset | |
| 129 | - // const url = data.path | |
| 130 | - // wx.switchTab({url}) | |
| 131 | - // this.setData({ | |
| 132 | - // selected: data.index | |
| 133 | - // }) | |
| 134 | - // } | |
| 135 | - | |
| 136 | 122 | |
| 137 | - | |
| 138 | 123 | } |
| 139 | 124 | |
| 140 | 125 | ... | ... |
custom-tab-bar/index.wxml
| ... | ... | @@ -4,9 +4,6 @@ |
| 4 | 4 | <block wx:if="{{item.nav_name !== '分销' && item.weappurl != '/pages/distribution/distribution'}}"> |
| 5 | 5 | <view data-url="{{item.weappurl}}" bindtap="nav_goto" class="tabbar_item" data-act="{{active==idx?1:0}}" |
| 6 | 6 | style="color: {{active==idx?fontcolor_sele:fontcolor}};"> |
| 7 | - <!-- <view data-url="{{item.weappurl}}" bindtap="nav_goto" class="tabbar_item" data-act="{{active==idx?1:0}}" | |
| 8 | - style="width:{{100 / list.length}}%;color: {{active==idx?fontcolor_sele:fontcolor}};"> --> | |
| 9 | - <!-- <view class="tabbar_item_wrapper"> --> | |
| 10 | 7 | <view class="{{item.specific ? 'tabbar_item_wrapper':''}}" style="background-color: {{item.specific ? item.button_background:'transparent'}};"> |
| 11 | 8 | <view class="tab_img"> |
| 12 | 9 | <view wx:if="{{item.nav_name=='购物车' && cartGoodsNum != 0}}" class="cart_num" >{{cartGoodsNum}}</view> |
| ... | ... | @@ -23,8 +20,7 @@ |
| 23 | 20 | <block wx:if="{{(item.nav_name === '分销' || item.weappurl === '/pages/distribution/distribution') && !is_no_distri}}"> |
| 24 | 21 | <view data-url="{{item.weappurl}}" bindtap="nav_goto" class="tabbar_item" data-act="{{active==idx?1:0}}" |
| 25 | 22 | style="color: {{active==idx?fontcolor_sele:fontcolor}};"> |
| 26 | - <!-- <view data-url="{{item.weappurl}}" bindtap="nav_goto" class="tabbar_item" data-act="{{active==idx?1:0}}" | |
| 27 | - style="width:{{100 / list.length}}%;color: {{active==idx?fontcolor_sele:fontcolor}};"> --> | |
| 23 | + | |
| 28 | 24 | <view class="{{item.specific ? 'tabbar_item_wrapper':''}}" style="background-color: {{item.specific ? item.button_background:'transparent'}};"> |
| 29 | 25 | <view class="tab_img"> |
| 30 | 26 | <view class="nav_imgage" style="background-image: url({{active==idx?item.src_sele:item.src}});"></view> | ... | ... |