Files
electron-egg/app/controller/v1/home.js
gaoshuaixing 404484475e demo hello
2020-12-18 18:54:34 +08:00

29 lines
434 B
JavaScript

'use strict';
const BaseController = require('../base');
class HomeController extends BaseController {
async index() {
const { ctx } = this;
const data = {
title: 'hello electron-egg'
};
await ctx.render('index.ejs', data);
}
async hello() {
const { ctx } = this;
const data = {
title: 'hello'
};
await ctx.render('hello.ejs', data);
}
}
module.exports = HomeController;