Commit 1a4aa9d7 authored by 劳琪峰's avatar 劳琪峰

chore: 补充实现热区点击

parent 38622195
......@@ -28,9 +28,36 @@ const debugMode = inject('debugMode', false)
function transformClickAreaProperties(item: ClickAreaType) {
let link;
if(item.link){
if (item.link) {
switch (item.link.type) {
case 'MINI_APP_THIRD':
case 'GOODS': // 星妈优选商品
link = {
type: JumpType.MINI,
url: `subPackages/shopMainProcess/product/index?productId=${item.link.value}&skuId=${item.link.skuId}`,
extra: {
appId: 'wx4205ec55b793245e',
}
}
break
case 'PAGE': // 页面
link = {
type: JumpType.INNER,
url: item.link.url,
}
break
case 'LINK': // 自定义链接
link = {
type: JumpType.H5,
url: '/pages/activity/index?url=' + encodeURIComponent(item.link.url),
}
break
case 'MINI_APP': // 小程序
link = {
type: JumpType.INNER,
url: '/pages/index/index?pageType=' + item.link.pageType.toLowerCase(),
}
break
case 'MINI_APP_THIRD': // 第三方小程序
link = {
type: JumpType.MINI,
url: item.link.url,
......@@ -39,6 +66,9 @@ function transformClickAreaProperties(item: ClickAreaType) {
}
}
break
case 'VIDEO': // 视频
// todo 视频播放
break
}
}
return {
......
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