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
07856deb
Commit
07856deb
authored
Jun 27, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: h5跳转
parent
81ad097b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
12 deletions
+15
-12
bottom.js
src/component/bottom/bottom.js
+2
-0
imageSwiper.js
src/component/imageSwiper/imageSwiper.js
+2
-0
picNav.js
src/component/picNav/picNav.js
+2
-2
h5page.js
src/subPackage/page/pages/h5/h5page.js
+2
-2
common.js
src/utils/common.js
+7
-8
No files found.
src/component/bottom/bottom.js
View file @
07856deb
...
@@ -87,6 +87,8 @@ Component({
...
@@ -87,6 +87,8 @@ Component({
}
else
if
(
currentClickType
==
2
)
{
}
else
if
(
currentClickType
==
2
)
{
wxService
.
openCard
()
wxService
.
openCard
()
}
}
}
else
if
(
link
.
type
==
6
){
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
}
}
}
}
...
...
src/component/imageSwiper/imageSwiper.js
View file @
07856deb
...
@@ -78,6 +78,8 @@ Component({
...
@@ -78,6 +78,8 @@ Component({
}
else
if
(
currentClickType
==
2
)
{
}
else
if
(
currentClickType
==
2
)
{
wxService
.
openCard
()
wxService
.
openCard
()
}
}
}
else
if
(
link
.
type
==
6
){
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
}
}
}
}
...
...
src/component/picNav/picNav.js
View file @
07856deb
...
@@ -36,13 +36,11 @@ Component({
...
@@ -36,13 +36,11 @@ Component({
*/
*/
methods
:
{
methods
:
{
imageLoad
(
e
)
{
imageLoad
(
e
)
{
console
.
log
(
'E'
,
e
)
let
imageSize
=
utils
.
imageUtil
(
e
)
let
imageSize
=
utils
.
imageUtil
(
e
)
this
.
setData
({
this
.
setData
({
imagewidth
:
imageSize
.
imageWidth
,
imagewidth
:
imageSize
.
imageWidth
,
imageheight
:
imageSize
.
imageHeight
imageheight
:
imageSize
.
imageHeight
})
})
console
.
log
(
imageSize
.
imageWidth
)
},
},
preview
(
e
)
{
preview
(
e
)
{
const
{
appid
,
path
,
link
,
item
}
=
e
.
currentTarget
.
dataset
const
{
appid
,
path
,
link
,
item
}
=
e
.
currentTarget
.
dataset
...
@@ -100,6 +98,8 @@ Component({
...
@@ -100,6 +98,8 @@ Component({
wxService
.
openCard
()
wxService
.
openCard
()
}
}
}
}
}
else
if
(
link
.
type
==
6
){
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
},
},
activeTocard
(
e
)
{
activeTocard
(
e
)
{
...
...
src/subPackage/page/pages/h5/h5page.js
View file @
07856deb
...
@@ -9,7 +9,8 @@ wxService.page({
...
@@ -9,7 +9,8 @@ wxService.page({
path
:
''
,
path
:
''
,
h5WhitePages
:
[
h5WhitePages
:
[
'/wxhd/activity/lotteryActivity/main.do'
,
'/wxhd/activity/lotteryActivity/main.do'
,
'/wxhd/weixin_loading.jsp'
'/wxhd/weixin_loading.jsp'
,
'baidu.com'
]
]
},
},
...
@@ -36,7 +37,6 @@ wxService.page({
...
@@ -36,7 +37,6 @@ wxService.page({
pass
=
regex
.
test
(
src
)
pass
=
regex
.
test
(
src
)
}
}
})
})
console
.
log
(
pass
)
// 不在白名单页中统一返回到首页
// 不在白名单页中统一返回到首页
if
(
!
pass
)
{
if
(
!
pass
)
{
wxService
.
router
(
'/pages/userCenter/userCenter'
).
back
()
wxService
.
router
(
'/pages/userCenter/userCenter'
).
back
()
...
...
src/utils/common.js
View file @
07856deb
...
@@ -65,15 +65,14 @@ HandlerLink.prototype = {
...
@@ -65,15 +65,14 @@ HandlerLink.prototype = {
return
currentOpen
return
currentOpen
// wxService.openCard()
// wxService.openCard()
}
}
}
else
if
(
type
==
6
){
// 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面
if
(
/http/gi
.
test
(
item
.
link
.
url
))
{
const
enCodeUrl
=
encodeURIComponent
(
item
.
link
.
url
)
return
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
`
}
return
`/
${
item
.
link
.
url
}
`
}
}
// else if(type == 6){
// // 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面
// if (/http/gi.test(url)) {
// const enCodeUrl = encodeURIComponent(url)
// return `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}`
// }
// return `/${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