|
@@ -237,18 +237,21 @@ class Action extends BaseController
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function ActionList()
|
|
|
- {
|
|
|
- $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();
|
|
|
- $total = ceil($count / $size) > 1 ? ceil($count / $size) : 1;
|
|
|
- $page = $page >= $total ? intval($total) : $page;
|
|
|
- $list = Db::name("action_list")->where(["is_del" => 0])->page($page, $size)->select()->toArray();
|
|
|
- $data = ['list' => $list, "count" => $count];
|
|
|
- return json_show(0, '获取成功', $data);
|
|
|
+ public function ActionList(){
|
|
|
+ $post =$this->request->post();
|
|
|
+ $pageid = isset($post['id']) ? intval($post['id']) : "";
|
|
|
+ if($pageid==""){
|
|
|
+ return error_show(1001,'页面id不能为空');
|
|
|
+ }
|
|
|
+ $condition = ['menuid'=>$pageid];
|
|
|
+ $data=Db::name('action')
|
|
|
+ ->alias("a")
|
|
|
+ ->leftJoin("action_list l","a.action_code=l.action_code")
|
|
|
+ ->field("a.*,action_name")
|
|
|
+ ->where($condition)
|
|
|
+ ->select()
|
|
|
+ ->toArray();
|
|
|
+ return app_show(0,"获取成功",$data);
|
|
|
}
|
|
|
|
|
|
|