Init: First Commit
一个初始的版本
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// 获取第一张图片
|
||||
export const getFirstImage = (note: API.Note.INoteData) => {
|
||||
if (note.media && note.media.length > 0) {
|
||||
return note.media[0].url;
|
||||
}
|
||||
|
||||
// 遗留版本
|
||||
if (note.photo && note.photo.length > 0) {
|
||||
return note.photo[0].url;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user