This commit is contained in:
gsx
2023-05-09 21:19:45 +08:00
parent c5828f90e4
commit 20ca08bd2a
32 changed files with 550 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
'use strict';
/**
* electron-egg framework - 功能demo
* @class
*/
class FrameworkController extends Controller {
constructor(ctx) {
super(ctx);
}
/**
* 所有方法接收两个参数
* @param args 前端传的参数
* @param event - ipc通信时才有值。详情见控制器文档
*/
/**
* test
*/
async test () {
const result = await this.service.example.test('electron');
// let tmpDir = Ps.getLogDir();
// Log.info('tmpDir:', tmpDir);
let mid = await Utils.machineIdSync(true);
Log.info('mid 11111111:', mid);
Utils.machineId().then((id) => {
Log.info('mid 222222222:', id);
});
return result;
}
}
FrameworkController.toString = () => '[class FrameworkController]';
module.exports = FrameworkController;