fix: 更换图片为png

This commit is contained in:
weifashi 2023-06-09 19:31:25 +08:00
parent ec032b91a3
commit 8d4511e2b1
2 changed files with 4 additions and 4 deletions

View File

@ -1834,7 +1834,7 @@ class UsersController extends AbstractController
$lists[] = [
'type' => 'children',
'url' => Base::fillUrl("api/users/share/list") . "?pid=" . $file['id'],
'icon' => url("/images/file/light/folder.svg"),
'icon' => $file['share'] == 1 ? url("/images/file/light/folder-share.png") : url("/images/file/light/folder.png"),
'extend' => ['upload_file_id'=>$file['id']],
'name' => $file['name'],
];
@ -1845,7 +1845,7 @@ class UsersController extends AbstractController
$lists[] = [
'type' => 'children',
'url' => Base::fillUrl("api/users/share/list")."?pid=0",
'icon' => url("/images/file/light/folder.svg"),
'icon' => url("/images/file/light/folder.png"),
'extend' => ['upload_file_id'=>0],
'name' => '全部文件',
];

View File

@ -107,7 +107,7 @@ class File extends AbstractModel
$permission = 1000;
$userids = $user->isTemp() ? [$user->userid] : [0, $user->userid];
$builder = File::wherePid($pid)
->when($type== 'dir',function($q){
->when($type=='dir',function($q){
$q->whereType('folder');
});
if ($pid > 0) {
@ -161,7 +161,7 @@ class File extends AbstractModel
->whereIn('file_users.userid', $userids)
->groupBy('files.id')
->take(100)
->when($type== 'dir',function($q){
->when($type=='dir',function($q){
$q->where('files.type','folder');
})
->get();