弹幕、分类下拉、属性下拉、
This commit is contained in:
@@ -35,6 +35,27 @@ class PostCategoryController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类树
|
||||
* @param Request $request
|
||||
* @return \support\Response
|
||||
*/
|
||||
public function preset(Request $request)
|
||||
{
|
||||
try {
|
||||
$params = $request->all();
|
||||
$result = $this->service->preset($params);
|
||||
foreach ($result as $k => $r){
|
||||
unset($r['created_at']);
|
||||
unset($r['updated_at']);
|
||||
$result[$k] = $this->indexFormat($r);
|
||||
}
|
||||
return $this->success($result, '获取分类下拉');
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表页数据格式化
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user