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
e677db30
Commit
e677db30
authored
Mar 03, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 跳转
parent
548132d0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
17 deletions
+22
-17
src/pages/index/index.vue
+3
-3
src/pages/tabBar1/index.vue
+1
-1
src/pages/tabBar2/index.vue
+1
-1
src/pages/tabBar3/index.vue
+1
-1
src/pages/tabBar4/index.vue
+1
-1
src/utils/mayi.js
+15
-10
No files found.
src/pages/index/index.vue
View file @
e677db30
<
template
>
<div>
<!--
<div>
{{
withoutScene
?
"初始化完成"
:
"初始化中"
}}
</div>
-->
<div
style=
"width:100%;height:90vh;display:flex;justify-content: center;align-items: center;"
>
<van-loading
size=
"40px"
type=
"spinner"
></van-loading>
</div>
...
...
@@ -24,7 +23,8 @@ export default {
baseUrl
:
process
.
env
.
BASE_URL
,
link
:
this
.
baseUrl
,
page
:
"/"
,
params
:
"?mixid="
+
this
.
shopId
+
'&native=1'
,
location_obj
:
wx
.
getStorageSync
(
"location"
),
params
:
"?mixid="
+
this
.
shopId
+
`&location_obj=
${
this
.
location_obj
}
`
,
userInfo
:
{
nickName
:
"mpvue"
,
...
...
@@ -134,7 +134,7 @@ export default {
//来自直播详情
this
.
page
=
decodeURIComponent
(
options
.
backpath
);
if
(
this
.
page
.
includes
(
"?"
)){
this
.
params
=
"&mixid="
+
this
.
shopId
+
'&native=1'
;
this
.
params
=
"&mixid="
+
this
.
shopId
+
`&location_obj=
${
this
.
location_obj
}
`
;
}
options
.
params
&&
(
this
.
params
+=
"&"
+
serialize
(
decodeURIComponent
(
options
.
params
)));
console
.
log
(
this
.
page
,
this
.
params
)
...
...
src/pages/tabBar1/index.vue
View file @
e677db30
...
...
@@ -22,7 +22,7 @@ export default {
return
{
link
:
process
.
env
.
BASE_URL
,
page
:
"/"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
"&tabbar=1&native=1"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
`&tabbar=1&location_obj=
${
wx
.
getStorageSync
(
"location"
)}
`
,
index
:
1
,
ss
:
""
,
};
...
...
src/pages/tabBar2/index.vue
View file @
e677db30
...
...
@@ -21,7 +21,7 @@ export default {
return
{
link
:
process
.
env
.
BASE_URL
,
page
:
"/"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
"&tabbar=2&native=1"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
`&tabbar=2&location_obj=
${
wx
.
getStorageSync
(
"location"
)}
`
,
index
:
2
,
ss
:
""
,
};
...
...
src/pages/tabBar3/index.vue
View file @
e677db30
...
...
@@ -21,7 +21,7 @@ export default {
return
{
link
:
process
.
env
.
BASE_URL
,
page
:
"/"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
"&tabbar=3&native=1"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
`&tabbar=3&location_obj=
${
wx
.
getStorageSync
(
"location"
)}
`
,
index
:
3
,
ss
:
""
,
};
...
...
src/pages/tabBar4/index.vue
View file @
e677db30
...
...
@@ -21,7 +21,7 @@ export default {
return
{
link
:
process
.
env
.
BASE_URL
,
page
:
"/"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
"&tabbar=4&native=1"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
`&tabbar=4&location_obj=
${
wx
.
getStorageSync
(
"location"
)}
`
,
index
:
4
,
ss
:
""
,
};
...
...
src/utils/mayi.js
View file @
e677db30
...
...
@@ -27,8 +27,9 @@ export function $themeToLink(data, option) {
let
app
=
getApp
();
let
type
=
data
.
type
;
// 点击底部栏
if
(
option
)
{
// 点击底部栏--
// if (option) {
// 登录拦截
let
parseLink
=
getUrlofLink
(
data
);
let
aa
=
noLoginListPath
.
includes
(
parseLink
)
||
parseLink
.
substr
(
0
,
7
)
==
"/goods/"
console
.
log
(
parseLink
,
aa
,
'parseLinkparseLinkparseLink'
,
parseLink
,
noLoginListPath
)
...
...
@@ -38,15 +39,19 @@ export function $themeToLink(data, option) {
return
}
//
替换首页位置
//
判断是否市跳转到tabbar页面 替换首页位置
let
isTabbarIndex
=
checkTabbarPage
(
parseLink
);
isTabbarIndex
=
isTabbarIndex
==
0
?
checkTabbarPage
(
'/'
)
:
isTabbarIndex
wx
.
switchTab
({
url
:
parseLink
==
'/'
?
'/pages/home/main'
:
`/pages/tabBar
${
isTabbarIndex
}
/main`
,
})
console
.
log
(
option
,
data
,
'---'
,
parseLink
==
'/'
?
'/pages/home/main'
:
`/pages/tabBar
${
isTabbarIndex
}
/main`
)
return
}
console
.
log
(
'44'
,
isTabbarIndex
)
if
(
isTabbarIndex
>=
0
)
{
isTabbarIndex
=
isTabbarIndex
==
0
?
checkTabbarPage
(
'/'
)
:
isTabbarIndex
wx
.
switchTab
({
url
:
parseLink
==
'/'
?
'/pages/home/main'
:
`/pages/tabBar
${
isTabbarIndex
}
/main`
,
})
return
}
// console.log(option, data,'---',parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`)
// 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