Commit 6deb6a94 by 赵雅纹

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

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