|
@@ -192,11 +192,10 @@ class Action extends BaseController
|
|
|
* }
|
|
|
* **/
|
|
|
|
|
|
-
|
|
|
//11获取素有菜单列表数据
|
|
|
public function index()
|
|
|
{
|
|
|
- $post = $this->request->post();
|
|
|
+ $post = $this->request->filter('trim')->post();
|
|
|
|
|
|
$where = [["status", "=", 1], ["is_del", "=", 0], ["level", ">=", $post["level"] ?? 1], ['menu_type', "=", 2]];
|
|
|
$data = Db::name("admin_menu")->where($where)->order("weight desc")->column("id,menu_name,menu_img,menu_route,menu_url,pid,level,is_show,is_private,menu_type,status");
|
|
@@ -219,9 +218,11 @@ class Action extends BaseController
|
|
|
return json_show(0, "获取成功", array_values($menu));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public function ActionList()
|
|
|
{
|
|
|
- $post = $this->post;
|
|
|
+ $post = $this->request->filter('trim')->post();
|
|
|
+
|
|
|
$page = isset($post['page']) ? intval($post['page']) : 1;
|
|
|
$size = isset($post['size']) ? intval($post['size']) : 10;
|
|
|
$count = Db::name("action_list")->where(["is_del" => 0])->count();
|
|
@@ -239,7 +240,7 @@ class Action extends BaseController
|
|
|
*/
|
|
|
public function ActionAdd()
|
|
|
{
|
|
|
- $post = $this->post;
|
|
|
+ $post = $this->request->filter('trim')->post();
|
|
|
$action_name = isset($post['action_name']) ? trim($post['action_name']) : "";
|
|
|
if ($action_name == "") {
|
|
|
return json_show(1001, '功能名称不能为空');
|
|
@@ -274,7 +275,8 @@ class Action extends BaseController
|
|
|
*/
|
|
|
public function ActionDel()
|
|
|
{
|
|
|
- $post = $this->post;
|
|
|
+ $post = $this->request->filter('trim')->post();
|
|
|
+
|
|
|
$action_id = isset($post['action_id']) ? intval($post['action_id']) : "";
|
|
|
if ($action_id === "") {
|
|
|
return json_show(1001, '参数action_id不能为空');
|