Files
pqs-9100_client/electron/controller/example.js

30 lines
613 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';
const { logger } = require('ee-core/log');
const { exampleService } = require('../service/example');
/**
* example
* @class
*/
class ExampleController {
/**
* 所有方法接收两个参数
* @param args 前端传的参数
* @param event - ipc通信时才有值。详情见控制器文档
*/
/**
* test
*/
async test () {
const result = await exampleService.test('electron');
logger.info('service result:', result);
return 'hello electron-egg';
}
}
ExampleController.toString = () => '[class ExampleController]';
module.exports = ExampleController;