titbit-loader
Version:
loader for titbit framework
66 lines (48 loc) • 953 B
JavaScript
class aaad {
constructor() {
//param用于指定最后的路由参数,默认就是/:id
//若要改变路由,则可以设置此属性,比如设置为/:name
//this.param = '/:id'
}
//控制器类初始化后会执行此函数。
//service默认是app.service,此参数通过titbit-loader初始化的initArgs选项进行控制。
async init(service) {
}
/**
* 获取资源具体内容
* @param {context} ctx
* @returns
*/
async get(ctx) {
}
/**
* 创建资源
* @param {context} ctx
* @returns
*/
async post(ctx) {
}
/**
* 更新资源
* @param {context} ctx
* @returns
*/
async put(ctx) {
}
/**
* GET请求,用于获取资源列表
* @param {context} ctx
* @returns
*/
async list(ctx) {
}
/**
* 删除资源
* @param {context} ctx
* @returns
*/
async _delete(ctx) {
}
}
module.exports = aaad