...
|
...
|
@@ -2,15 +2,25 @@ const Router = require('koa-router'); |
|
|
const router = new Router();
|
|
|
|
|
|
const file = {
|
|
|
page: async(ctx, next) => {
|
|
|
/**
|
|
|
* 文件管理页面
|
|
|
*/
|
|
|
page: async(ctx) => {
|
|
|
await ctx.render('/action/file_page');
|
|
|
},
|
|
|
|
|
|
upload: async(ctx, next) => {
|
|
|
await ctx.render('/action/upload_page');
|
|
|
/**
|
|
|
* 上传处理
|
|
|
*/
|
|
|
upload: async(ctx) => {
|
|
|
return ctx.body = {
|
|
|
code: 200,
|
|
|
msg: 'uploaded!'
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
|
|
|
router.get('/page', file.page);
|
|
|
router.post('/upload', file.upload);
|
|
|
|
|
|
module.exports = router; |
...
|
...
|
|