Browse Source

Change router to limit rule

HonorLee 5 years ago
parent
commit
5fe7da43f3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      system/lib/core/router.js

+ 2 - 0
system/lib/core/router.js

@@ -34,6 +34,8 @@ var Router ={
                 path = pathArr.join('/');
                 if(FILE.existsSync(Core.Path.Handler + `${path}.js`)){
                     handlerFile = `${path}.js`;
+                }else if(FILE.existsSync(Core.Path.Handler + `${path}/index.js`)){
+                    handlerFile = `${path}/index.js`;
                 }
             }
         }