diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index 7635695..484baab 100644 --- a/themes/beauty/controller/SiteController.php +++ b/themes/beauty/controller/SiteController.php @@ -324,7 +324,7 @@ Class SiteController extends Controller { $imgExts = !empty(FSC::$app['config']['supportedImageExts']) ? FSC::$app['config']['supportedImageExts'] : array('jpg', 'jpeg', 'png', 'webp', 'gif'); $imgFile = $scanner->getSnapshotImage($realpath, $imgExts); - //支持视频目录 + //支持视频、音乐目录 if (empty($imgFile)) { $videoExts = !empty(FSC::$app['config']['supportedVideoExts']) ? FSC::$app['config']['supportedVideoExts'] : array('mp4', 'mov', 'm3u8'); $firstVideo = $scanner->getSnapshotImage($realpath, $videoExts); @@ -342,6 +342,12 @@ Class SiteController extends Controller { $size = 'vm'; Common::saveCacheToFile($cacheKey, compact('url', 'size'), $cacheSubDir); } + }else { + $audioExts = !empty(FSC::$app['config']['supportedAudioExts']) ? FSC::$app['config']['supportedAudioExts'] : array('mp3'); + $firstVideo = $scanner->getSnapshotImage($realpath, $audioExts); + if (!empty($firstVideo)) { + $url = '/img/beauty/audio_icon.jpeg'; + } } }else { $url = $imgFile['path']; diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 03b3ced..c8f7a41 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -275,7 +275,7 @@ eof; 'audio' => '音乐', ); - echo '