diff --git a/common/Index.ets b/common/Index.ets index 6436503..2f52062 100644 --- a/common/Index.ets +++ b/common/Index.ets @@ -6,7 +6,7 @@ export { BridgeTracer } from './src/main/ets/log/BridgeTracer'; export { EventBus, EventPayload } from './src/main/ets/event/EventBus'; export { NavEvents, OpenGenericWebPayload, SwitchGamePayload, BackGamePayload } from './src/main/ets/event/NavEvents'; -export { ShareEvents, SharePanelRequest, SharePanelResult, PhotoUploadPayload } +export { ShareEvents, SharePanelRequest, SharePanelResult, ShareGuideRequest, ShareGuideResult, PhotoUploadPayload } from './src/main/ets/event/ShareEvents'; export { DIContainer, Factory } from './src/main/ets/di/DIContainer'; export { ErrorCenter, ErrorStrategy, ErrorSink } from './src/main/ets/error/ErrorCenter'; diff --git a/common/src/main/ets/event/ShareEvents.ets b/common/src/main/ets/event/ShareEvents.ets index 6a24d4a..129fa8d 100644 --- a/common/src/main/ets/event/ShareEvents.ets +++ b/common/src/main/ets/event/ShareEvents.ets @@ -15,6 +15,8 @@ export class ShareEvents { * 经此事件投给 ShareProvider 走微信图片分享(对齐 Android OkHttpPhotoServer + savehandler)。 */ static readonly PHOTO_UPLOAD: string = 'share.photoUpload'; + /** 请求弹出分享指引窗(渠道选定后,由 ShareProvider 发,BridgeGameContainer 弹窗)。 */ + static readonly SHOW_GUIDE: string = 'share.showGuide'; } /** PHOTO_UPLOAD 载荷(H5 POST 上传的截图)。 */ @@ -38,3 +40,19 @@ export interface SharePanelResult { /** 'wechat' | 'qq' | 'douyin' | 'cancel' */ platform: string; } + +/** SHOW_GUIDE 载荷。 */ +export interface ShareGuideRequest { + /** 渠道:'wechat' | 'qq' | 'douyin'。 */ + platform: string; + /** 内容类型:'text' | 'image'(决定指引文案与系统分享走 systemText/systemImage)。 */ + contentKind: string; + /** 用户选定动作后回投的一次性事件名(ShareProvider 已 EventBus.once 监听)。 */ + resultEvent: string; +} + +/** 指引窗动作回投载荷。 */ +export interface ShareGuideResult { + /** 'open'(打开App)| 'system'(用系统分享)| 'cancel'。 */ + action: string; +}