Commit fef729d0 by 高淑倩

add: tabBar

parent ba2ae622
...@@ -9,7 +9,10 @@ Component({ ...@@ -9,7 +9,10 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
tabBar:{
type: Object,
value: null
}
}, },
attached () { attached () {
......
<!--component/bottomTabs/bottomTabs.wxml--> <!--component/bottomTabs/bottomTabs.wxml-->
<view class='bgc fixed-bottom0' style="background-image:url('/assets/imgs/7_1_0/bg.png')" wx:if="{{type == 1}}"> <view class='bgc fixed-bottom0 {{tabBar.num == 4 ? "height: 108rpx ":"height: 144rpx"}}' style="background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}})" wx:if="{{tabBar.num == 4}}">
<!--
activeImageUrl: "http://testimg3.bigaka.com/group3/M00/00/1C/Cv6CBF1mT1OAERvZAAAE9OdIB14989.png"
desc: ""
imageUrl: "http://testimg3.bigaka.com/group3/M00/00/1C/Cv6CBF1mTzmAL7sKAAADJzlh7Tk417.png"
number: 0
redirectId: ""
type: 0
-->
<block wx:for="{{tabBar.images}}" wx:key="{{index}}" wx:for-item="tab">
<view
class="tab"
data-route="{{tab.route}}"
bindtap="handelToPage"
>
<image class='tab-img {{index != 2 ? "pdt":""}}' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />
<image class='tab-img {{index != 2 ? "pdt":""}}' wx:else src='{{tab.imageUrl}}' />
</view>
</block>
</view>
<view class="bottom-tab fixed-bottom0" style="height: 108rpx;" wx:if="{{tabBar.num == 5}}">
<block wx:for="{{tabs}}" wx:key="{{index}}" wx:for-item="tab"> <block wx:for="{{tabs}}" wx:key="{{index}}" wx:for-item="tab">
<view class="tab" data-route="{{tab.route}}" bindtap="handelToPage">
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />
<image class='tab-img' wx:else src='{{tab.imageUrl}}' />
</view>
</block>
<!-- <block wx:for="{{tabs}}" wx:key="{{index}}" wx:for-item="tab">
<view <view
class="tab" class="tab"
data-route="{{tab.route}}" data-route="{{tab.route}}"
...@@ -17,5 +46,5 @@ ...@@ -17,5 +46,5 @@
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.active}}' /> <image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.active}}' />
<image class='tab-img' wx:else src='{{tab.inactive}}' /> <image class='tab-img' wx:else src='{{tab.inactive}}' />
</view> </view>
</block> </block>-->
</view> </view>
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
} }
.bgc { .bgc {
height: 144rpx;
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
display: flex; display: flex;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px"> <view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)--> <!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem"> <block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
{{pItem.type}}
<view wx:if="{{pItem.type == 1}}"> <view wx:if="{{pItem.type == 1}}">
<image-swiper image-data="{{pItem.rotationchart.images}}"/> <image-swiper image-data="{{pItem.rotationchart.images}}"/>
</view> </view>
...@@ -16,7 +15,7 @@ ...@@ -16,7 +15,7 @@
<bottom bottom="{{pItem.bottom}}" /> <bottom bottom="{{pItem.bottom}}" />
</view> </view>
<view class="" wx:if="{{pItem.type == 5}}"> <view class="" wx:if="{{pItem.type == 5}}">
<bottom-tabs tabBar="{{pItem.tabBar}}"/> <bottom-tabs tab-bar="{{pItem.tabBar}}"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 6}}"> <view class="" wx:if="{{pItem.type == 6}}">
<announcement notice="{{pItem.notice}}"/> <announcement notice="{{pItem.notice}}"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment