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
4b6f271d
Commit
4b6f271d
authored
Aug 29, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跳转集点详情
parent
65fbcbb3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
56 deletions
+68
-56
picNav.js
src/component/picNav/picNav.js
+63
-55
tabSort.js
src/component/tabSort/tabSort.js
+3
-1
common.js
src/utils/common.js
+2
-0
No files found.
src/component/picNav/picNav.js
View file @
4b6f271d
...
...
@@ -43,68 +43,76 @@ Component({
})
},
preview
(
e
)
{
const
{
appid
,
path
,
link
,
item
}
=
e
.
currentTarget
.
dataset
const
ev
=
e
.
currentTarget
.
dataset
let
curItemType
=
ev
.
item
console
.
log
(
'ev'
,
curItemType
)
const
{
memberActivateStatus
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 获取当前帐号信息
const
accountInfo
=
utils
.
getAccountInfo
()
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 2019.06.14
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
item
.
link
.
type
,
item
)
if
(
link
.
type
==
1
)
{
// 触发父组件更新页面 外部小程序
this
.
setData
({
isAuthorization
:
false
})
return
false
}
else
if
(
!
userInfo
)
{
// userInfo 不存在 授权弹框
this
.
setData
({
isAuthorization
:
true
})
return
false
// link row
if
(
curItemType
.
link
)
{
console
.
log
(
'222222222'
)
}
else
if
(
curItemType
.
row
)
{
console
.
log
(
'3333333333'
)
}
// 2019.06.14
// let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
// if (link.type == 1) {
// // 触发父组件更新页面 外部小程序
// this.setData({
// isAuthorization: false
// })
// return false
// } else if (!userInfo) {
// // userInfo 不存在 授权弹框
// this.setData({
// isAuthorization: true
// })
// return false
// }
if
(
link
.
type
==
2
)
{
// 触发父组件更新页面
wxService
.
nextTick
(()
=>
{
this
.
triggerEvent
(
'updatePage'
,
{
pageId
:
currentClickType
.
url
})
})
}
else
if
(
link
.
type
==
3
)
{
// 预览
wx
.
previewImage
({
current
:
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
imageUrl
}
`
,
// 当前显示图片的http链接
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
})
}
else
if
(
link
.
type
==
4
)
{
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
link
.
type
==
5
)
{
if
(
currentClickType
==
1
)
{
wxService
.
openCard
()
}
else
if
(
currentClickType
==
2
)
{
// wxService.openCard()
if
(
userInfo
&&
userInfo
.
member
&&
userInfo
.
member
.
mobile
&&
!
userInfo
.
memberActivateStatus
)
{
// 手机号存在 但未激活 跳转激活领卡页面 老用户
this
.
setData
({
isAuthorizationActiveText
:
'新激活领卡'
,
isAuthorization
:
true
,
isAuthorizationType
:
3
},
()
=>
{
return
false
})
}
else
{
wxService
.
openCard
()
}
}
}
else
if
(
link
.
type
==
6
){
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
link
.
type
==
7
){
// 集点详情
let
pointPath
=
currentClickType
&&
currentClickType
.
split
(
'?'
)[
0
]
let
pointIdParams
=
currentClickType
&&
currentClickType
.
split
(
'?'
)[
1
]
let
pointId
=
pointIdParams
.
split
(
'='
)[
1
]
wxService
.
router
(
`
${
pointPath
}
`
).
search
({
id
:
pointId
})
}
//
if (link.type == 2) {
//
// 触发父组件更新页面
//
wxService.nextTick(() => {
//
this.triggerEvent('updatePage', { pageId: currentClickType.url })
//
})
//
} else if (link.type == 3) {
//
// 预览
//
wx.previewImage({
//
current: `${app.globalData.imageUrl}/${currentClickType.imageUrl}`, // 当前显示图片的http链接
//
urls: [`${app.globalData.imageUrl}/${currentClickType.link.url}`] // 需要预览的图片http链接列表
//
})
//
} else if (link.type == 4) {
//
wxService.router(`${currentClickType}`)
//
} else if (link.type == 5) {
//
if (currentClickType == 1) {
//
wxService.openCard()
//
} else if (currentClickType == 2) {
//
// wxService.openCard()
//
if (userInfo && userInfo.member && userInfo.member.mobile && !userInfo.memberActivateStatus) {
//
// 手机号存在 但未激活 跳转激活领卡页面 老用户
//
this.setData({
//
isAuthorizationActiveText: '新激活领卡',
//
isAuthorization: true,
//
isAuthorizationType: 3
//
}, () => {
//
return false
//
})
//
} else {
//
wxService.openCard()
//
}
//
}
//
} else if(link.type == 6){
//
wxService.router(`${currentClickType}`)
//
} else if(link.type == 7){
//
// 集点详情
//
let pointPath = currentClickType && currentClickType.split('?')[0]
//
let pointIdParams = currentClickType && currentClickType.split('?')[1]
//
let pointId = pointIdParams.split('=')[1]
//
wxService.router(`${pointPath}`).search({ id: pointId })
//
}
},
activeTocard
(
e
)
{
if
(
e
.
detail
)
{
...
...
src/component/tabSort/tabSort.js
View file @
4b6f271d
...
...
@@ -93,12 +93,14 @@ Component({
wxService
.
router
(
`/
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
// 集点详情
console
.
log
(
'pointPath'
,
currentClickType
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
else
if
(
curItemType
.
row
)
{
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
console
.
log
(
'bacccccccccc'
,
currentClickRow
)
if
(
rowObj
.
type
==
1
)
{
}
else
if
(
rowObj
.
type
==
2
)
{
}
else
if
(
rowObj
.
type
==
3
)
{
}
...
...
src/utils/common.js
View file @
4b6f271d
...
...
@@ -72,6 +72,8 @@ HandlerLink.prototype = {
return
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
`
}
return
`/
${
item
.
link
.
url
}
`
}
else
if
(
type
==
7
)
{
return
`
${
item
.
link
.
url
}
`
}
}
}
...
...
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