feat(share): common 新增 SHOW_GUIDE 事件与 ShareGuide 载荷(分享重构 §4)
This commit is contained in:
+1
-1
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user