This commit is contained in:
gsx
2022-02-20 11:41:28 +08:00
parent 4f8adfe33f
commit c6633ac16c
30 changed files with 739 additions and 386 deletions

View File

@@ -0,0 +1,38 @@
'use strict';
const Controller = require('ee-core').Controller;
const { app } = require('electron');
class ExampleController extends Controller {
/**
* test
*/
async test (args) {
let obj = {
status:'ok'
}
// 调用egg的某个api
// const result = await this.app.curlEgg('post', '/api/v1/example/test2', {name: 'gsx2'});
// console.log('fffffffffff: ', result);
//this.app.logger.info('ssssssssssssssssssss');
return obj;
}
/**
* hello
*/
hello (args, event) {
let newMsg = args + " +1";
let reply = '';
reply = '收到:' + args + ',返回:' + newMsg;
// let channel = "example.socketMessageStop";
// event.reply(`${channel}`, '另外的数据');
return reply;
}
}
module.exports = ExampleController;