14 lines
398 B
JavaScript
14 lines
398 B
JavaScript
const Service = require('egg').Service;
|
|
|
|
class Tgdppda extends Service {
|
|
async index(){
|
|
let task = await this.app.mysql.get('dblocal').query(`select * from ye4s_warehouse`);
|
|
return task;
|
|
}
|
|
async push(sid){
|
|
const { ctx, app } = this;
|
|
app.io.to(sid).emit('customEvent', { message: 'Hello from Egg.js' });
|
|
return 1;
|
|
}
|
|
}
|
|
module.exports = Tgdppda; |