mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-19 22:38:09 +08:00
job demo
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user