文章接口微调
This commit is contained in:
parent
80acb020ea
commit
463ec3b5e4
@ -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'] ?? [];//获取当前登陆管理员权限
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user