This commit is contained in:
IndieKKY
2024-10-06 13:07:05 +08:00
parent 6c008feb3f
commit 240f760ae9
6 changed files with 114 additions and 113 deletions

View File

@@ -1,7 +1,7 @@
// 请求信息
export type L2ReqMsg = {
from: 'extension' | 'inject' | 'app'
target: string
// target: string
method: string
params?: any
// [key: string]: any
@@ -10,8 +10,12 @@ export type L2ReqMsg = {
// 响应信息
export type L2ResMsg<L2Res = any> = {
code: number
message?: string
msg?: string
data?: L2Res
}
export const MESSAGE_TO_EXTENSION_HANDSHAKE = 'handshake'
export const MESSAGE_TO_EXTENSION_ROUTE_MSG = 'routeMsg'
export const TAG_TARGET_INJECT = 'target:inject'
export const TAG_TARGET_APP = 'target:app'