|
|
@ -100,7 +100,7 @@ Class ListController extends Controller { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取目录面包屑 |
|
|
|
//获取目录面包屑 |
|
|
|
$subcate = $scanResults[$cateId]; |
|
|
|
$subcate = !empty($scanResults[$cateId]) ? $scanResults[$cateId] : array(); |
|
|
|
$breadcrumbs = $this->getBreadcrumbs($currentDir, $cachedParentData, $scanner); |
|
|
|
$breadcrumbs = $this->getBreadcrumbs($currentDir, $cachedParentData, $scanner); |
|
|
|
|
|
|
|
|
|
|
|
//图片、视频类型筛选支持 |
|
|
|
//图片、视频类型筛选支持 |
|
|
@ -152,7 +152,7 @@ Class ListController extends Controller { |
|
|
|
|
|
|
|
|
|
|
|
//dataType支持:[image, video] |
|
|
|
//dataType支持:[image, video] |
|
|
|
$dataType = $this->get('dataType', 'html'); |
|
|
|
$dataType = $this->get('dataType', 'html'); |
|
|
|
if ($dataType == 'image') { |
|
|
|
if ($dataType == 'image' && !empty($subcate['files'])) { |
|
|
|
$imgExts = !empty(FSC::$app['config']['supportedImageExts']) ? FSC::$app['config']['supportedImageExts'] : array('jpg', 'jpeg', 'png', 'webp', 'gif'); |
|
|
|
$imgExts = !empty(FSC::$app['config']['supportedImageExts']) ? FSC::$app['config']['supportedImageExts'] : array('jpg', 'jpeg', 'png', 'webp', 'gif'); |
|
|
|
$imgs = array(); |
|
|
|
$imgs = array(); |
|
|
|
$pageStartIndex = ($page-1) * $pageSize; |
|
|
|
$pageStartIndex = ($page-1) * $pageSize; |
|
|
@ -172,7 +172,7 @@ Class ListController extends Controller { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->renderJson(compact('page', 'pageSize', 'imgs')); |
|
|
|
return $this->renderJson(compact('page', 'pageSize', 'imgs')); |
|
|
|
}else if ($dataType == 'video') { |
|
|
|
}else if ($dataType == 'video' && !empty($subcate['files'])) { |
|
|
|
$videoExts = !empty(FSC::$app['config']['supportedVideoExts']) ? FSC::$app['config']['supportedVideoExts'] : array('mp4', 'mov', 'm3u8'); |
|
|
|
$videoExts = !empty(FSC::$app['config']['supportedVideoExts']) ? FSC::$app['config']['supportedVideoExts'] : array('mp4', 'mov', 'm3u8'); |
|
|
|
$videos = array(); |
|
|
|
$videos = array(); |
|
|
|
$pageStartIndex = ($page-1) * $pageSize; |
|
|
|
$pageStartIndex = ($page-1) * $pageSize; |
|
|
|