Commit a84f8470 authored by liujiangnan's avatar liujiangnan

fix: 事件通讯

parent 2c70614c
......@@ -2,10 +2,10 @@ var t_name = 'AI_BOOK_TOOL';
const callServerMethod = (method, data) => {
return new Promise((resolve, reject) => {
window.courseware.onEvent(method, (result) => {
console.log('result', result);
window.courseware.removeEvent(method, t_name);
window.courseware.onEvent(method, (result, next) => {
// window.courseware.removeEvent(method, t_name);
resolve(result);
next();
}, t_name);
window.courseware.sendEvent(method, data, t_name);
});
......
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