Commit 07856deb by 高淑倩

add: h5跳转

parent 81ad097b
......@@ -87,6 +87,8 @@ Component({
} else if (currentClickType == 2) {
wxService.openCard()
}
} else if(link.type == 6){
wxService.router(`${currentClickType}`)
}
}
}
......
......@@ -78,6 +78,8 @@ Component({
} else if (currentClickType == 2) {
wxService.openCard()
}
} else if(link.type == 6){
wxService.router(`${currentClickType}`)
}
}
}
......
......@@ -36,13 +36,11 @@ Component({
*/
methods: {
imageLoad(e) {
console.log('E',e)
let imageSize = utils.imageUtil(e)
this.setData({
imagewidth: imageSize.imageWidth,
imageheight: imageSize.imageHeight
})
console.log(imageSize.imageWidth)
},
preview(e) {
const { appid, path, link, item } = e.currentTarget.dataset
......@@ -100,6 +98,8 @@ Component({
wxService.openCard()
}
}
} else if(link.type == 6){
wxService.router(`${currentClickType}`)
}
},
activeTocard(e) {
......
......@@ -9,7 +9,8 @@ wxService.page({
path: '',
h5WhitePages: [
'/wxhd/activity/lotteryActivity/main.do',
'/wxhd/weixin_loading.jsp'
'/wxhd/weixin_loading.jsp',
'baidu.com'
]
},
......@@ -36,7 +37,6 @@ wxService.page({
pass = regex.test(src)
}
})
console.log(pass)
// 不在白名单页中统一返回到首页
if (!pass) {
wxService.router('/pages/userCenter/userCenter').back()
......
......@@ -65,15 +65,14 @@ HandlerLink.prototype = {
return currentOpen
// 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