diff --git a/src/platform/electron-browser/preload.ts b/src/platform/electron-browser/preload.ts index bd07f5c4..605e074c 100644 --- a/src/platform/electron-browser/preload.ts +++ b/src/platform/electron-browser/preload.ts @@ -150,12 +150,12 @@ window.eo.getModuleSettings = (moduleID) => { // 注册单个mock路由 window.eo.registerMockRoute = ({ method, path, data }) => { - return ipcRenderer.sendSync('eo-sync', { action: 'registerMockRoute', data: { method, path, data } }); + return ipcRenderer.send('eo-sync', { action: 'registerMockRoute', data: { method, path, data } }); }; // 注销mock路由 window.eo.unRegisterMockRoute = ({ method, path }) => { - return ipcRenderer.sendSync('eo-sync', { action: 'unRegisterMockRoute', data: { method, path } }); + return ipcRenderer.send('eo-sync', { action: 'unRegisterMockRoute', data: { method, path } }); }; // 获取mock服务地址 window.eo.getMockUrl = () => {