This commit is contained in:
gsx
2023-04-05 13:16:02 +08:00
parent e8e2d6aec5
commit e1d30a55ac
4 changed files with 46 additions and 33 deletions

View File

@@ -31,7 +31,7 @@ class ExampleController extends Controller {
/**
* 所有方法接收两个参数
* @param args 前端传的参数
* @param event - ipc通信时才有值。invoke()方法时event == IpcMainInvokeEvent; send()/sendSync()方法时event == IpcMainEvent
* @param event - ipc通信时才有值。详情见:控制器文档
*/
/**
@@ -684,9 +684,13 @@ class ExampleController extends Controller {
someJob (args, event) {
let jobId = args.id;
let type = args.type;
this.service.example.doJob(jobId, type, event);
let pid = this.service.example.doJob(jobId, type, event);
return;
let data = {
jobId,
pid
}
return data;
}
/**