Commit b36ce54a authored by 郑磊's avatar 郑磊

update api

parent 66e27b10
......@@ -58,10 +58,14 @@ function callAndroidApi(name: string, ...args: any[]): void {
let result: any
if (typeof params !== 'undefined' && params !== null) {
result = window.liveapp[name](JSON.stringify(params))
//result = window.liveapp[name](JSON.stringify(params))
params = JSON.stringify(JSON.stringify(params))
} else {
result = window.liveapp[name]()
params = ''
}
result = eval(`window.liveapp.${name}(${params})`)
if (typeof ack === 'function') {
ack(result)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment