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
96c70a15
Commit
96c70a15
authored
Sep 12, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bottomTab
parent
d4b8fd3d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
bottomTabs.js
src/component/bottomTabs/bottomTabs.js
+36
-2
bottomTabs.wxml
src/component/bottomTabs/bottomTabs.wxml
+2
-1
picNav.wxml
src/component/picNav/picNav.wxml
+1
-0
No files found.
src/component/bottomTabs/bottomTabs.js
View file @
96c70a15
...
...
@@ -25,7 +25,40 @@ Component({
attached
()
{
this
.
setData
({
baseImgUrl
:
app
.
globalData
.
imageUrl
})
})
const
{
tabBar
}
=
this
.
data
tabBar
.
forEach
(
item
=>
{
// 存在 row 处理数据 8 商品 9 分类
let
newRow
=
null
if
(
item
.
link
)
{
if
(
item
.
link
.
type
==
2
){
// 父组件 更新
const
urls
=
getCurrentPages
()
const
currentPath
=
urls
[
0
]
const
pageId
=
item
.
link
.
url
console
.
log
(
'currentPath'
,
currentPath
.
route
,
item
.
link
.
url
)
item
.
link
.
newPath
=
`/
${
currentPath
.
route
}
`
}
return
}
else
if
(
item
.
row
)
{
newRow
=
JSON
.
parse
(
item
.
row
)
if
(
newRow
.
type
==
8
)
{
newRow
.
newPath
=
'/pages/productDetail/productDetail'
}
else
if
(
newRow
.
type
==
9
)
{
newRow
.
newPath
=
'/subPackage/page/pages/categoryPro/categoryPro'
}
else
{
newRow
.
newPath
=
''
}
// item.row = JSON.stringify(newRow)
item
.
row
=
newRow
}
})
this
.
setData
({
tabBar
},
()
=>
{
console
.
log
(
'wwwwtabBar'
,
this
.
data
.
tabBar
)
})
},
ready
()
{
this
.
setData
({
...
...
@@ -86,7 +119,8 @@ Component({
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
else
if
(
curItemType
.
row
)
{
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
// let rowObj = JSON.parse(curItemType.row)
let
rowObj
=
curItemType
.
row
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
if
(
rowObj
.
type
==
1
)
{
}
...
...
src/component/bottomTabs/bottomTabs.wxml
View file @
96c70a15
...
...
@@ -5,7 +5,8 @@
<block wx:for="{{tabBar.images}}" wx:key="{{index}}" wx:for-item="tab">
<view class="tab">
<!--当前页面需要授权 且未授权-->
<view wx:if="{{utils.hanlerLinkNeedAuth(tab.link.url)}}" class="btn-tab">
<!--<view wx:if="{{utils.hanlerLinkNeedAuth(tab.link.url)}}" class="btn-tab">-->
<view wx:if="{{tab.link ? utils.hanlerLinkNeedAuth(typeOf(tab.link.newPath) != undefined ? tab.link.newPath : tab.link.url) : utils.hanlerLinkNeedAuth(tab.row.newPath ? tab.row.newPath : tab.row.url)}}" class="btn-tab">
<view wx:if="{{!currentHasUserInfo}}" class="btn-tab">
<button
bindgetuserinfo="_getUserInfo"
...
...
src/component/picNav/picNav.wxml
View file @
96c70a15
...
...
@@ -7,6 +7,7 @@
wx:for-item="item"
class="nav-block"
>
<!--当前页面需要授权 且未授权-->
<view wx:if="{{item.link ? utils.hanlerLinkNeedAuth(typeOf(item.link.newPath) != undefined ? item.link.newPath : item.link.url) : utils.hanlerLinkNeedAuth(item.row.newPath ? item.row.newPath : item.row.url)}}">
<button
wx:if="{{!currentHasUserInfo}}"
...
...
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