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
c6bcd90a
Commit
c6bcd90a
authored
Nov 06, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页重定向
parent
8107f5b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
currentLinkRouter.js
src/utils/currentLinkRouter.js
+5
-1
No files found.
src/utils/currentLinkRouter.js
View file @
c6bcd90a
...
@@ -6,7 +6,7 @@ function currentLinkRouter(event, _this) {
...
@@ -6,7 +6,7 @@ function currentLinkRouter(event, _this) {
let
curItemType
=
ev
.
item
let
curItemType
=
ev
.
item
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// link row
// link row
console
.
log
(
'curItemType'
,
curItemType
)
if
(
curItemType
.
link
)
{
if
(
curItemType
.
link
)
{
//处理返回值是空对象时 导致跳转失败
//处理返回值是空对象时 导致跳转失败
if
(
Object
.
keys
(
curItemType
.
link
).
length
>
0
){
if
(
Object
.
keys
(
curItemType
.
link
).
length
>
0
){
...
@@ -27,7 +27,11 @@ function currentLinkRouter(event, _this) {
...
@@ -27,7 +27,11 @@ function currentLinkRouter(event, _this) {
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
})
})
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
if
(
currentClickType
===
'/pages/userCenter/userCenter'
)
{
wxService
.
router
(
`
${
currentClickType
}
`
).
replace
()
// 是首页重定向
}
else
{
wxService
.
router
(
`
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
if
(
currentClickType
==
1
)
{
if
(
currentClickType
==
1
)
{
wxService
.
openCard
()
wxService
.
openCard
()
...
...
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