代码优化
This commit is contained in:
@@ -1480,7 +1480,7 @@ class ContentLibraryController extends Controller
|
||||
$url = $url[0];
|
||||
|
||||
//兼容链接采集不到标题及图标
|
||||
if (empty($moment['title']) || empty($moment['coverImage'])) {
|
||||
if (empty($moment['title'])) {
|
||||
// 检查是否是飞书链接
|
||||
if (strpos($url, 'feishu.cn') !== false) {
|
||||
// 飞书文档需要登录,无法直接获取内容,返回默认信息
|
||||
@@ -1507,9 +1507,15 @@ class ContentLibraryController extends Controller
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if (strpos($url, 'feishu.cn') !== false) {
|
||||
$coverImage = 'http://karuosiyujzk.oss-cn-shenzhen.aliyuncs.com/2025/07/09/3db2a5d7fe49011ab68175a42a5094ce.jpeg';
|
||||
}else{
|
||||
$coverImage = 'http://karuosiyujzk.oss-cn-shenzhen.aliyuncs.com/2025/07/09/ec039d96fad6eab1d960f207d3d9ca9f.jpeg';
|
||||
}
|
||||
|
||||
$urls[] = [
|
||||
'url' => $url,
|
||||
'image' => $moment['coverImage'],
|
||||
'image' => !empty($moment['coverImage']) ? $moment['coverImage'] : $coverImage,
|
||||
'desc' => $moment['title']
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user