diff --git a/crmeb/app/adminapi/controller/AuthController.php b/crmeb/app/adminapi/controller/AuthController.php index 421202c..17c7145 100644 --- a/crmeb/app/adminapi/controller/AuthController.php +++ b/crmeb/app/adminapi/controller/AuthController.php @@ -48,6 +48,10 @@ class AuthController extends BaseController $this->adminId = $this->request->adminId();//获取当前登陆管理员ID $this->adminInfo = $this->request->adminInfo();//获取当前登陆管理员信息 $this->auth = $this->request->adminInfo['rule'] ?? [];//获取当前登陆管理员权限 + + + + } /** diff --git a/crmeb/app/api/controller/v1/publics/ArticleController.php b/crmeb/app/api/controller/v1/publics/ArticleController.php index 19ac352..80783e0 100644 --- a/crmeb/app/api/controller/v1/publics/ArticleController.php +++ b/crmeb/app/api/controller/v1/publics/ArticleController.php @@ -45,11 +45,13 @@ class ArticleController $where = ['cid' => $cid]; } [$page, $limit] = $this->services->getPageValue(); - $list = $this->services->getList($where, $page, $limit)['list']; + $data = $this->services->getList($where, $page, $limit); + $list = $data['list']; + $count = $data['count']; foreach ($list as &$item){ $item['add_time'] = date('Y-m-d H:i', $item['add_time']); } - return app('json')->success($list); + return app('json')->success(['list'=>$list,"count"=>$count]); } /** diff --git a/crmeb/route/route.php b/crmeb/route/route.php index b334eb0..4881217 100644 --- a/crmeb/route/route.php +++ b/crmeb/route/route.php @@ -48,7 +48,12 @@ Route::miss(function () { } else { - return view(app()->getRootPath() . 'public' . DS . 'index.html'); + if (is_dir(app()->getRootPath() . 'public' . DS . 'web') && !request()->get('mdType')) { + return view(app()->getRootPath() . 'public' . DS . 'web' . DS . 'index.html'); + } else { + return view(app()->getRootPath() . 'public' . DS . 'index.html'); + } + } } });