Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-webview
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frontend
mall-webview
Commits
8064e355
Commit
8064e355
authored
May 22, 2026
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(util): 添加原生桥接调试日志
在use-native-bridge工具函数中添加调试日志,便于追踪原生方法调用和回调处理流程, 方便问题排查和调试。
parent
7dc5a36f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
use-native-bridge.ts
src/util/use-native-bridge.ts
+3
-0
No files found.
src/util/use-native-bridge.ts
View file @
8064e355
...
@@ -103,6 +103,7 @@ function invokeNativeMethod<T = any, P = any> (arg: { type: string; data?: P },
...
@@ -103,6 +103,7 @@ function invokeNativeMethod<T = any, P = any> (arg: { type: string; data?: P },
eventBus
.
on
(
GEEK_NATIVE_NAME
,
onCallback
)
eventBus
.
on
(
GEEK_NATIVE_NAME
,
onCallback
)
function
onCallback
(
params
?:
NativeInvokeFuncParams
)
{
function
onCallback
(
params
?:
NativeInvokeFuncParams
)
{
console
.
log
(
'onCallback'
,
params
)
if
(
params
?.
method
===
callbackName
)
{
if
(
params
?.
method
===
callbackName
)
{
if
(
timer
)
{
if
(
timer
)
{
clearTimeout
(
timer
)
clearTimeout
(
timer
)
...
@@ -116,6 +117,8 @@ function invokeNativeMethod<T = any, P = any> (arg: { type: string; data?: P },
...
@@ -116,6 +117,8 @@ function invokeNativeMethod<T = any, P = any> (arg: { type: string; data?: P },
}
}
}
}
console
.
log
(
'sendNativeMessage'
,
{
...
arg
,
__callback__
:
callbackName
})
sendNativeMessage
({
...
arg
,
__callback__
:
callbackName
})
sendNativeMessage
({
...
arg
,
__callback__
:
callbackName
})
})
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment