chore: update pages\index

This commit is contained in:
2025-10-30 18:23:35 +08:00
parent 55ebc174b9
commit aa0b776e6b
3 changed files with 47 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ class DomEventBridge {
return !event.defaultPrevented return !event.defaultPrevented
// #endif // #endif
// #ifdef MP - WEIXIN // #ifdef MP
// 小程序环境不支持 DOM 事件 // 小程序环境不支持 DOM 事件
return true return true
// #endif // #endif

View File

@@ -29,6 +29,39 @@ class EventBus {
return 'weapp' return 'weapp'
// #endif // #endif
// #ifdef MP-ALIPAY
return 'alipay'
// #endif
// #ifdef MP-BAIDU
return 'baidu'
// #endif
// #ifdef MP-TOUTIAO
return 'toutiao'
// #endif
// #ifdef MP-QQ
return 'qq'
// #endif
// #ifdef MP-KUAISHOU
return 'kuaishou'
// #endif
// #ifdef MP-JD
return 'jd'
// #endif
// #ifdef MP-360
return '360'
// #endif
// #ifdef MP-XHS
return 'xhs'
// #endif
return 'unknown' return 'unknown'
} }

View File

@@ -21,8 +21,19 @@ export default {
this.getFollowQrcode(); this.getFollowQrcode();
}, },
mounted() { mounted() {
// 监听图片点击事件 // 监听图片、文字、商品列表等组件的点击事件
this.unsubscribe = this.$eventBus?.on('pictureTap', this._handleDiyGroupInteractionEvent); this.unsubscribe = this.$eventBus?.onMany([
'rubik-cube-tap',
'picture-tap',
'text-tap',
'goods-list-tap',
'presale-tap',
'notes-tap',
'merch-list-tap',
'map-tap',
'img-ads-tap',
'many-goods-list-tap'
], this._handleDiyGroupInteractionEvent);
}, },
beforeDestroy() { beforeDestroy() {
// 移除图片点击事件监听 // 移除图片点击事件监听