update from server

This commit is contained in:
zhaoxinyu
2024-07-25 14:41:47 +08:00
parent e67b63616e
commit 8b8d12bfed
13 changed files with 176 additions and 60 deletions
@@ -26,6 +26,23 @@ const removeHTMLTag = (str) => {
return str;
}
function groupBy(array, key) {
return array.reduce((result, currentItem) => {
// 使用 key 函数获取分组的键
const groupKey = key(currentItem);
// 检查结果对象中是否已经有了这个键
const existingGroup = result.find(item => item.key === groupKey);
if (existingGroup) {
// 如果已存在,则将当前项添加到该组数组中
existingGroup.items.push(currentItem);
} else {
// 如果不存在,则创建新组并添加当前项
result.push({ key: groupKey, items: [currentItem] });
}
return result;
}, []);
}
const CREATE_PREVIEW_URL = (val) => {
return FILE_STREAM_PREVIEW_ADDRESS + "?id=" + val
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long