pull/811/head
gedoor 4 years ago
parent 92d90f8d6b
commit 019434da06
  1. 6
      app/src/main/assets/web/index.js

@ -383,15 +383,15 @@ $('.menu').addEventListener('click', e => {
ws.send(`{"tag":"${saveRule[0].bookSourceUrl}", "key":"${sKey}"}`); ws.send(`{"tag":"${saveRule[0].bookSourceUrl}", "key":"${sKey}"}`);
}; };
ws.onmessage = (msg) => { ws.onmessage = (msg) => {
DebugPrint(msg.data == 'finish' ? `\n[${Date().split(' ')[4]}] 调试任务已完成!` : msg.data); console.log('[调试]', msg);
if (msg.data == 'finish') setRule(saveRule[0]); DebugPrint(msg.data);
}; };
ws.onerror = (err) => { ws.onerror = (err) => {
throw `${err.data}`; throw `${err.data}`;
} }
ws.onclose = () => { ws.onclose = () => {
thisNode.setAttribute('class', ''); thisNode.setAttribute('class', '');
DebugPrint(`[${Date().split(' ')[4]}] 调试服务已关闭!`); DebugPrint(`\n调试服务已关闭!`);
} }
} else throw `${sResult.errorMsg}`; } else throw `${sResult.errorMsg}`;
}).catch(err => { }).catch(err => {

Loading…
Cancel
Save