mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-16 14:12:51 +00:00
fix: 更该文件类型都为 children
This commit is contained in:
parent
95ec53381b
commit
d3a3c34287
@ -1826,13 +1826,13 @@ class UsersController extends AbstractController
|
|||||||
return Base::retSuccess('success', $data);
|
return Base::retSuccess('success', $data);
|
||||||
}
|
}
|
||||||
// 获取数据
|
// 获取数据
|
||||||
if ($pid !== -1) {
|
|
||||||
$lists = [];
|
$lists = [];
|
||||||
|
if ($pid !== -1) {
|
||||||
$fileList = (new File)->getFileList($user,$pid,'dir',false);
|
$fileList = (new File)->getFileList($user,$pid,'dir',false);
|
||||||
foreach($fileList as $file){
|
foreach($fileList as $file){
|
||||||
if($file['id'] != $pid){
|
if($file['id'] != $pid){
|
||||||
$lists[] = [
|
$lists[] = [
|
||||||
'type' => count((new File)->getFileList($user,$file['id'],'dir',false)) > 0 ? 'children' : 'item',
|
'type' => 'children',
|
||||||
'url' => Base::fillUrl("api/users/share/list") . "?pid=" . $file['id'],
|
'url' => Base::fillUrl("api/users/share/list") . "?pid=" . $file['id'],
|
||||||
'icon' => url("/images/file/light/folder.svg"),
|
'icon' => url("/images/file/light/folder.svg"),
|
||||||
'extend' => ['upload_file_id'=>$file['id']],
|
'extend' => ['upload_file_id'=>$file['id']],
|
||||||
@ -1842,13 +1842,13 @@ class UsersController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$lists = [[
|
$lists[] = [
|
||||||
'type' => 'children',
|
'type' => 'children',
|
||||||
'url' => Base::fillUrl("api/users/share/list")."?pid=0",
|
'url' => Base::fillUrl("api/users/share/list")."?pid=0",
|
||||||
'icon' => url("/images/file/light/folder.svg"),
|
'icon' => url("/images/file/light/folder.svg"),
|
||||||
'extend' => ['upload_file_id'=>0],
|
'extend' => ['upload_file_id'=>0],
|
||||||
'name' => '全部文件',
|
'name' => '全部文件',
|
||||||
]];
|
];
|
||||||
$dialogList = (new WebSocketDialog)->getDialogList($user->userid);
|
$dialogList = (new WebSocketDialog)->getDialogList($user->userid);
|
||||||
foreach($dialogList['data'] as $dialog){
|
foreach($dialogList['data'] as $dialog){
|
||||||
if($dialog['type'] == 'user'){
|
if($dialog['type'] == 'user'){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user