Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
22fcc826
Commit
22fcc826
authored
Mar 29, 2021
by
张卓
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nativehome_tst' of
http://code.mayi888.com/chengmo/mayi-mp-shop
into nativehome_tst
parents
e86afeda
cf08618e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
src/pages/home/index.vue
+2
-1
src/utils/mayi.js
+19
-7
No files found.
src/pages/home/index.vue
View file @
22fcc826
...
...
@@ -105,6 +105,7 @@
<apply-sucess-entry></apply-sucess-entry>
</div>
<!-- 底部栏 -->
{{
active
}}
<custom-tab-bar
class=
"custom-tab-bar"
:selected=
"active"
></custom-tab-bar>
</div>
</
template
>
...
...
@@ -407,7 +408,7 @@ export default {
})
},
scrolls
(
el
){
this
.
setFooterShow
(
el
);
//
this.setFooterShow(el);
if
(
this
.
pageData
)
{
for
(
let
i
=
0
;
i
<
this
.
pageData
.
length
;
i
++
)
{
const
element
=
this
.
pageData
[
i
]
...
...
src/utils/mayi.js
View file @
22fcc826
...
...
@@ -26,6 +26,11 @@ export function getUrlofQuery(data) {
}
// 全局跳转 data:link数据 option:是否为底部栏触发
export
function
$themeToLink
(
data
,
option
)
{
// console.log(currentPage,'currentPage',getUrlofLink(data))
// if(getUrlofLink(data).includes(currentPage)) return
//
let
app
=
getApp
();
let
type
=
data
.
type
;
// 登录拦截和底部导航栏拦截(非功能项)
...
...
@@ -44,14 +49,21 @@ export function $themeToLink(data, option) {
let
isTabbarIndex
=
checkTabbarPage
(
parseLink
);
if
(
isTabbarIndex
>=
0
)
{
// 无底部栏h5页面
if
(
!
containFooterPage
.
includes
(
parseLink
))
{
toPage
(
getUrlofLink
(
data
),
getUrlofQuery
(
data
))
return
}
isTabbarIndex
=
isTabbarIndex
==
0
?
checkTabbarPage
(
'/'
)
:
isTabbarIndex
let
query
=
parseQuery
?
`?
${
parseQuery
}
`
:
''
// if (!containFooterPage.includes(parseLink)) {
// toPage(getUrlofLink(data), getUrlofQuery(data))
// return
// }
isTabbarIndex
=
isTabbarIndex
==
0
?
checkTabbarPage
(
'/'
)
:
isTabbarIndex
;
let
url
=
parseLink
==
'/'
?
`/pages/home/main`
:
`/pages/tabBar
${
isTabbarIndex
}
/main`
;
let
routes
=
getCurrentPages
();
let
currentPage
=
routes
[
routes
.
length
-
1
].
route
;
if
(
currentPage
==
url
)
return
let
query
=
parseQuery
?
`?
${
parseQuery
}
`
:
''
;
wx
.
reLaunch
({
url
:
parseLink
==
'/'
?
`/pages/home/main
${
query
}
`
:
`/pages/tabBar
${
isTabbarIndex
}
/main
${
query
}
`
,
url
:
url
+
query
})
return
}
...
...
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