Commit 07856deb by 高淑倩

add: h5跳转

parent 81ad097b
...@@ -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}`)
} }
} }
} }
......
...@@ -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}`)
} }
} }
} }
......
...@@ -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) {
......
...@@ -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()
......
...@@ -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}`
// }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment