接入我的足迹

This commit is contained in:
owen
2024-01-11 00:25:13 +08:00
parent f3659c7929
commit c2f29333dc
3 changed files with 120 additions and 70 deletions
+2 -2
View File
@@ -74,12 +74,12 @@ const VIDEO_SUFFIX_LIST = ['.avi', '.mp4']
* @return {{src: string, type: 'video' | 'image' }[]} 转换后的链接列表
*/
export function formatGoodsSwiper(urlList) {
return urlList.filter(url => url).map((url, key) => {
return urlList?.filter(url => url).map((url, key) => {
const isVideo = VIDEO_SUFFIX_LIST.some(suffix => url.includes(suffix));
const type = isVideo ? 'video' : 'image'
const src = $url.cdn(url);
return { type, src }
});
}) || [];
}
/**