|
@@ -88,7 +88,13 @@ public function plist(){
|
|
$total = ceil($count / $size);
|
|
$total = ceil($count / $size);
|
|
$page = $page >= $total ? $total : $page;
|
|
$page = $page >= $total ? $total : $page;
|
|
$list = Db::name('cat')->where($where)->page($page, $size)->select();
|
|
$list = Db::name('cat')->where($where)->page($page, $size)->select();
|
|
- return app_show(0, "获取成功", ['list' =>$list, 'count' => $count]);
|
|
|
|
|
|
+ $data=[];
|
|
|
|
+ foreach ($list as $value){
|
|
|
|
+ $temp= isset($value['id']) && $value['id'] !=0 ? made($value['id']):[];
|
|
|
|
+ $value['item'] = array_column($temp,'id');
|
|
|
|
+ $data[]=$value;
|
|
|
|
+ }
|
|
|
|
+ return app_show(0, "获取成功", ['list' =>$data, 'count' => $count]);
|
|
}
|
|
}
|
|
|
|
|
|
public function title(){
|
|
public function title(){
|
|
@@ -318,7 +324,7 @@ public function edit(){
|
|
//$level = isset($this->post['level']) && $this->post['level'] !=="" ? intval($this->post['level']) :"";
|
|
//$level = isset($this->post['level']) && $this->post['level'] !=="" ? intval($this->post['level']) :"";
|
|
|
|
|
|
$weight = isset($this->post['weight']) && $this->post['weight']!==""? intval($this->post['weight']):"0";
|
|
$weight = isset($this->post['weight']) && $this->post['weight']!==""? intval($this->post['weight']):"0";
|
|
- $status = isset($this->post['status']) && $this->post['status'] !==""?intval($this->post['status']) :"1";
|
|
|
|
|
|
+ $status = isset($this->post['status']) && $this->post['status'] !==""?intval($this->post['status']) :"0";
|
|
Db::startTrans();
|
|
Db::startTrans();
|
|
try{
|
|
try{
|
|
$str = [
|
|
$str = [
|
|
@@ -327,7 +333,7 @@ public function edit(){
|
|
"pid"=>$pid,
|
|
"pid"=>$pid,
|
|
"level"=>$level,
|
|
"level"=>$level,
|
|
"weight"=>$weight,
|
|
"weight"=>$weight,
|
|
- "status"=>$status,
|
|
|
|
|
|
+ // "status"=>$status,
|
|
"cat_desc"=>$cat_desc,
|
|
"cat_desc"=>$cat_desc,
|
|
"is_del"=>0,
|
|
"is_del"=>0,
|
|
"updatetime"=>date("Y-m-d H:i:s"),
|
|
"updatetime"=>date("Y-m-d H:i:s"),
|