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
07d75b1d
Commit
07d75b1d
authored
Nov 06, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
type89
parent
bf7d488f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
common.js
src/utils/common.js
+5
-4
currentLinkRouter.js
src/utils/currentLinkRouter.js
+4
-5
No files found.
src/utils/common.js
View file @
07d75b1d
...
@@ -36,13 +36,10 @@ HandlerLink.prototype = {
...
@@ -36,13 +36,10 @@ HandlerLink.prototype = {
appId
:
item
.
link
.
appid
,
appId
:
item
.
link
.
appid
,
path
:
`
${
item
.
link
.
url
}
`
,
path
:
`
${
item
.
link
.
url
}
`
,
success
:
e
=>
{
success
:
e
=>
{
console
.
log
(
'type=1'
,
e
)
},
},
fail
:
e
=>
{
fail
:
e
=>
{
console
.
log
(
'type=1'
,
e
)
},
},
complete
:
e
=>
{
complete
:
e
=>
{
console
.
log
(
e
)
},
},
})
})
return
''
return
''
...
@@ -74,7 +71,11 @@ HandlerLink.prototype = {
...
@@ -74,7 +71,11 @@ HandlerLink.prototype = {
return
`/
${
item
.
link
.
url
}
`
return
`/
${
item
.
link
.
url
}
`
}
else
if
(
type
==
7
)
{
}
else
if
(
type
==
7
)
{
return
`
${
item
.
link
.
url
}
`
return
`
${
item
.
link
.
url
}
`
}
}
else
if
(
type
==
8
)
{
return
`
${
item
.
link
.
url
}
`
}
else
if
(
type
==
9
)
{
return
`
${
item
.
link
.
url
}
`
}
}
}
}
}
...
...
src/utils/currentLinkRouter.js
View file @
07d75b1d
...
@@ -6,12 +6,11 @@ function currentLinkRouter(event, _this) {
...
@@ -6,12 +6,11 @@ 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
){
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
curItemType
.
link
.
type
,
curItemType
)
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
curItemType
.
link
.
type
,
curItemType
)
if
(
curItemType
.
link
.
type
==
1
)
{
if
(
curItemType
.
link
.
type
==
1
)
{
// 触发父组件更新页面 外部小程序
// 触发父组件更新页面 外部小程序
}
else
if
(
curItemType
.
link
.
type
==
2
)
{
}
else
if
(
curItemType
.
link
.
type
==
2
)
{
...
@@ -46,7 +45,7 @@ function currentLinkRouter(event, _this) {
...
@@ -46,7 +45,7 @@ function currentLinkRouter(event, _this) {
}
else
if
(
curItemType
.
link
.
type
==
8
)
{
}
else
if
(
curItemType
.
link
.
type
==
8
)
{
wxService
.
router
(
`/pages/productDetail/productDetail?id=
${
currentClickType
}
`
)
wxService
.
router
(
`/pages/productDetail/productDetail?id=
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
9
)
{
}
else
if
(
curItemType
.
link
.
type
==
9
)
{
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
${
currentClickType
}
`
)
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
id=
${
currentClickType
}
`
)
}
}
}
}
else
{
else
{
...
@@ -66,7 +65,7 @@ function currentLinkRouter(event, _this) {
...
@@ -66,7 +65,7 @@ function currentLinkRouter(event, _this) {
}
}
else
if
(
rowObj
.
type
==
9
)
{
else
if
(
rowObj
.
type
==
9
)
{
// 分类
// 分类
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
${
currentClickRow
}
`
)
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
id=
${
currentClickRow
}
`
)
}
}
}
}
}
else
if
(
curItemType
.
row
)
{
}
else
if
(
curItemType
.
row
)
{
...
@@ -86,7 +85,7 @@ function currentLinkRouter(event, _this) {
...
@@ -86,7 +85,7 @@ function currentLinkRouter(event, _this) {
}
}
else
if
(
rowObj
.
type
==
9
)
{
else
if
(
rowObj
.
type
==
9
)
{
// 分类
// 分类
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
${
currentClickRow
}
`
)
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
id=
${
currentClickRow
}
`
)
}
}
}
}
}
}
...
...
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