Files
electron-egg/electron/controller/effect.js
2023-05-09 21:19:45 +08:00

42 lines
772 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use strict';
/**
* 特效 - 功能demo
* @class
*/
class EffectController 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;
}
}
EffectController.toString = () => '[class EffectController]';
module.exports = EffectController;