Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
6deb6a94
Commit
6deb6a94
authored
Aug 30, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_7.1.0' into feature-zyw-sc
parents
c6090382
239854c4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
21 deletions
+39
-21
bottomTabs.js
src/component/bottomTabs/bottomTabs.js
+12
-3
bottomTabs.wxml
src/component/bottomTabs/bottomTabs.wxml
+1
-8
userCenter.js
src/pages/userCenter/userCenter.js
+17
-7
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+1
-1
subPage.js
src/subPackage/page/pages/subPage/subPage.js
+7
-1
subPage.wxml
src/subPackage/page/pages/subPage/subPage.wxml
+1
-1
No files found.
src/component/bottomTabs/bottomTabs.js
View file @
6deb6a94
...
...
@@ -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
(
'=动态子页面==='
)
}
}
},
...
...
src/component/bottomTabs/bottomTabs.wxml
View file @
6deb6a94
<!--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"
...
...
src/pages/userCenter/userCenter.js
View file @
6deb6a94
...
...
@@ -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
currentTabBar
Arr
=
[]
let
currentTabBar
RedirectIdArr
=
[]
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
)
=>
{
...
...
src/pages/userCenter/userCenter.wxml
View file @
6deb6a94
...
...
@@ -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}}" />
...
...
src/subPackage/page/pages/subPage/subPage.js
View file @
6deb6a94
...
...
@@ -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
)
...
...
src/subPackage/page/pages/subPage/subPage.wxml
View file @
6deb6a94
...
...
@@ -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}}" />
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment