修复后台模块
This commit is contained in:
@@ -9,6 +9,15 @@
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
use think\facade\Route;
|
||||
use app\model\Model;
|
||||
|
||||
$model = Model::where('status', '>', 0)->field(['id', 'name'])->select()->toArray();
|
||||
|
||||
foreach ($model as $value) {
|
||||
Route::rule('/admin/' . $value['name'] . '/:function', 'admin.content/:function')->append(['name'=>$value['name']]);
|
||||
Route::rule('/front/' . $value['name'] . '/:function', 'front.content/:function')->append(['name'=>$value['name']]);
|
||||
Route::rule('/user/' . $value['name'] . '/:function', 'user.content/:function')->append(['name'=>$value['name']]);
|
||||
}
|
||||
|
||||
Route::rule('/', 'Front.Index/index');
|
||||
Route::rule('search', 'Front.Content/search');
|
||||
@@ -48,4 +57,4 @@ Route::group('api', function () {
|
||||
'Access-Control-Allow-Headers' => 'authorization, token, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With',
|
||||
]);
|
||||
|
||||
Route::miss('Index/miss');
|
||||
Route::miss('front.Index/miss');
|
||||
Reference in New Issue
Block a user