Commit 6deb6a94 by 赵雅纹

Merge branch 'dev_7.1.0' into feature-zyw-sc

parents c6090382 239854c4
...@@ -12,6 +12,10 @@ Component({ ...@@ -12,6 +12,10 @@ Component({
tabBar:{ tabBar:{
type: Object, type: Object,
value: null value: null
},
currHomePageId: {
type: String,
value: ''
} }
}, },
attached () { attached () {
...@@ -24,10 +28,15 @@ Component({ ...@@ -24,10 +28,15 @@ Component({
}, },
observers: { observers: {
currentRoute(nRoute, oRoute) { currentRoute(nRoute, oRoute) {
console.log('nRoute, oRoute', nRoute, oRoute)
const {currentRoute} = this.data
if(nRoute != oRoute){ if(nRoute != oRoute){
this.setData({
currentRoute: nRoute
})
}
const {currentRoute} = this.data
if(currentRoute.indexOf('subPackage/page/pages/subPage/subPage') > -1){
// 子页面 判断id
console.log('=动态子页面===')
} }
} }
}, },
......
<!--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}}
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"> <block wx:for="{{tabBar.images}}" wx:key="{{index}}" wx:for-item="tab">
<view <view
class="tab" class="tab"
......
...@@ -23,12 +23,14 @@ wxService.page({ ...@@ -23,12 +23,14 @@ wxService.page({
// isAllScreen: fullSucreen.isAllScreen // isAllScreen: fullSucreen.isAllScreen
isAllScreen: config.isAllScreen, isAllScreen: config.isAllScreen,
token:'', token:'',
isAuthorization: false, // isAuthorization: false,
isAuthorization: true,
pageId: 3, pageId: 3,
baseUserInfo: null, baseUserInfo: null,
// cardMember: null, // cardMember: null,
pageBackgroundColor: 0, pageBackgroundColor: 0,
guidePageModalShow: false guidePageModalShow: false,
currHomePageId: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -154,21 +156,29 @@ wxService.page({ ...@@ -154,21 +156,29 @@ wxService.page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: data.page.title title: data.page.title
}) })
// 首页 pageId
// data.page.pageId
this.setData({
currHomePageId: data.page.pageId
})
// tabBar // tabBar
const currentTabBar = data.paragraphs.filter(item=> item.type == 5) const currentTabBar = data.paragraphs.filter(item=> item.type == 5)
let currentTabBarArr =[] let currentTabBarRedirectIdArr = []
currentTabBar.forEach(tab=> { currentTabBar.forEach(tab=> {
currentTabBarArr = tab.tabBar.images tab.tabBar.images.forEach(item=> {
console.log('---', currentTabBarArr)
currentTabBarArr.forEach(item=> {
if(item.link){ if(item.link){
console.log('-link--',item.link.type, item.link.url) currentTabBarRedirectIdArr.push(item.redirectId-0)
console.log('-link--',item.link.type, item.redirectId)
} else if(item.row){ } else if(item.row){
console.log('-row--') console.log('-row--')
} }
}) })
}) })
const {currHomePageId} = this.data
let isCurrentBar = currentTabBarRedirectIdArr.includes(currHomePageId)
console.log('-roaaaaaw--',currentTabBarRedirectIdArr, isCurrentBar)
// 段落 // 段落
const products = data.paragraphs const products = data.paragraphs
const filterResult = products.map((res,index)=>{ const filterResult = products.map((res,index)=>{
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</view>--> </view>-->
<view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}"> <view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}">
<!-- <attention wx:if="{{pItem.type == 9}}" /> wx:else --> <!-- <attention wx:if="{{pItem.type == 9}}" /> wx:else -->
<bottom-tabs bind:updatePage="updatePage" tab-bar="{{pItem.tabBar}}" /> <bottom-tabs currHome-pageId="{{currHomePageId}}" bind:updatePage="updatePage" 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}}" />
......
...@@ -22,7 +22,8 @@ wxService.page({ ...@@ -22,7 +22,8 @@ wxService.page({
isAllScreen: config.isAllScreen, isAllScreen: config.isAllScreen,
token:'', token:'',
isAuthorization: false, isAuthorization: false,
pageId: 3 pageId: 3,
currHomePageId: ''
}, },
/** /**
...@@ -134,6 +135,11 @@ wxService.page({ ...@@ -134,6 +135,11 @@ wxService.page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: data.page.title title: data.page.title
}) })
// 首页 pageId
// data.page.pageId
this.setData({
currHomePageId: data.page.pageId
})
// tabBar // tabBar
const currentTabBar = data.paragraphs.filter(item=> item.type == 5) const currentTabBar = data.paragraphs.filter(item=> item.type == 5)
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</view>--> </view>-->
<view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}"> <view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}">
<!-- <attention wx:if="{{pItem.type == 9}}" /> wx:else --> <!-- <attention wx:if="{{pItem.type == 9}}" /> wx:else -->
<bottom-tabs bind:updatePage="updatePage" tab-bar="{{pItem.tabBar}}" /> <bottom-tabs currHome-pageId="{{currHomePageId}}" bind:updatePage="updatePage" 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