Commit dd23395e by 高淑倩

currentTab

parent e23f6378
......@@ -84,6 +84,7 @@ Component({
const userInfo = wx.getStorageSync('_baseUserInfo')
console.log('curItemType', curItemType, curItemType.link.type)
debugger
// link row
if (curItemType.link) {
let currentClickType = app.globalData.commonFunc.getLink(curItemType.link.type, curItemType)
......@@ -104,6 +105,7 @@ Component({
}
if (curItemType.link.type == 2) {
// 触发父组件更新页面
wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url })
......
<!--component/bottomTabs/bottomTabs.wxml-->
<view class='bgc fixed-bottom0' style="background-color:#FFF;background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}});{{tabBar.num == 4 ? 'height: 108rpx':'height: 144rpx'}}" wx:if="{{tabBar.num == 4}}">
{{currHomePageId}} --{{currentRoute}}
<block wx:for="{{tabBar.images}}" wx:key="{{index}}" wx:for-item="tab">
<view
class="tab"
data-item="{{tab}}"
bindtap="handelToPage"
>
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />
<!--<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />-->
<image class='tab-img' wx:if="{{currHomePageId == tab.redirectId}}" src='{{tab.activeImageUrl}}' />
<image class='tab-img' wx:else src='{{tab.imageUrl}}' />
</view>
</block>
......@@ -15,29 +15,8 @@
<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">
<view class="tab" data-item="{{tab}}" bindtap="handelToPage">
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />
<image class='tab-img' wx:if="{{currHomePageId == tab.redirectId}}" 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
class="tab"
data-route="{{tab.route}}"
bindtap="handelToPage"
>
<image class='tab-img {{index != 2 ? "pdt":""}}' wx:if="{{currentRoute == tab.route}}" src='{{tab.active}}' />
<image class='tab-img {{index != 2 ? "pdt":""}}' wx:else src='{{tab.inactive}}' />
</view>
</block>
</view>
<view class="bottom-tab fixed-bottom0" style="height: 108rpx;" wx:if="{{type == 2}}">
<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.active}}' />
<image class='tab-img' wx:else src='{{tab.inactive}}' />
</view>
</block>-->
</view>
......@@ -62,6 +62,7 @@ wxService.page({
* */
updatePage(ev) {
const {pageId} = ev.detail
console.log('0000', pageId)
// this.setData({
// pages: [],
// pageId
......
......@@ -35,6 +35,6 @@
</view>-->
</block>
</view>
<!--<authorization-modal isAuthorization='{{isAuthorization}}' />-->
<authorization-modal isAuthorization='{{isAuthorization}}' />
<guide-page-modal show="{{guidePageModalShow}}" />
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