Commit dd23395e by 高淑倩

currentTab

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