'use strict'; const { Controller } = require('ee-core'); const { shell } = require('electron'); const Log = require('ee-core/log'); /** * example * @class */ class UtilsController extends Controller { constructor(ctx) { super(ctx); } /** * 所有方法接收两个参数 * @param args 前端传的参数 * @param event - ipc通信时才有值。详情见:控制器文档 */ /** * upload */ async openFileFolder (params) { // const result = await Services.get('example').test('electron'); Log.info(params) Log.info(decodeURIComponent(params)) shell.openPath(params); } async shellFun (params) { shell[params.action](params.params) } } UtilsController.toString = () => '[class ExampleController]'; module.exports = UtilsController;