前端下载文件替换src/components/uploadPictures/index.vue文件重新进行打包
后台
app/adminapi/controller/v1/file/SystemAttachmentCategory.php
public function index()
{
$where = $this->request->getMore([
['name', ''],
['pid', 0]
]);
if ($where['name'] != '') $where['pid'] = '';
return app('json')->success($this->service->getAll($where));
}
app/model/system/attachment/SystemAttachmentCategory.php
if ($value != '') $query->where('name', 'like', '%' . $value . '%');
if ($value !== '') $query->where('pid', $value);
app/services/system/attachment/SystemAttachmentCategoryServices.php
public function getAll(array $where)
{
$list = $this->dao->getList($where);
foreach ($list as &$item) {
$item['title'] = $item['name'];
$item['children'] = [];
if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) $item['loading'] = false;
}
return compact('list');
}
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}