jj.js 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/app.js CHANGED
@@ -49,7 +49,7 @@ class App extends Koa
49
49
  cfg_app.static_dir && this.use(require('koa-static')(path.join(cfg_app.base_dir, cfg_app.static_dir)));
50
50
 
51
51
  // koa-body
52
- cfg_app.koa_body && this.use(require('koa-body')(cfg_app.koa_body));
52
+ cfg_app.koa_body && this.use(require('koa-body').koaBody(cfg_app.koa_body));
53
53
 
54
54
  // router
55
55
  this.use(router.routes()).use(router.allowedMethods());
package/lib/router.js CHANGED
@@ -32,7 +32,7 @@ if (cfg_routes) {
32
32
  }
33
33
 
34
34
  // 注册系统路由
35
- router.all(cfg_app.app_multi ? '/:APP?/:CONTROLLER?/:ACTION?' : '/:CONTROLLER?/:ACTION?', async (ctx, next) => {
35
+ router.all(cfg_app.app_multi ? '{/:APP}{/:CONTROLLER}{/:ACTION}' : '{/:CONTROLLER}{/:ACTION}', async (ctx, next) => {
36
36
  ctx.APP = ctx.params.APP || cfg_app.default_app;
37
37
  ctx.CONTROLLER = ctx.params.CONTROLLER || cfg_app.default_controller;
38
38
  ctx.ACTION = ctx.params.ACTION || cfg_app.default_action;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jj.js",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "A super simple lightweight NodeJS MVC framework(一个超级简单轻量的NodeJS MVC框架)",
5
5
  "main": "jj.js",
6
6
  "scripts": {},