mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-22 14:13:49 +08:00
refactor: 优化代码结构并新增多标签分类应用加载逻辑
1. 重构下载重试超时列表为多行格式提升可读性 2. 合并环境变量配置行简化代码 3. 新增多标签分类页面的应用加载能力,包括: - 添加displayCategories和displayApps计算属性 - 实现loadTabCategories和loadTabApps加载子分类数据 - 抽离normalizeAppJson复用应用数据格式化逻辑 - 优化侧边栏分类切换的应用过滤逻辑
This commit is contained in:
@@ -407,7 +407,9 @@ async function processNextInQueue() {
|
||||
sendStatus("downloading");
|
||||
|
||||
// 下载重试逻辑:共10次,5次3秒,3次5秒,2次10秒
|
||||
const timeoutList = [3000, 3000, 3000, 3000, 3000, 5000, 5000, 5000, 10000, 10000];
|
||||
const timeoutList = [
|
||||
3000, 3000, 3000, 3000, 3000, 5000, 5000, 5000, 10000, 10000,
|
||||
];
|
||||
let retryCount = 0;
|
||||
let downloadSuccess = false;
|
||||
|
||||
|
||||
@@ -106,7 +106,9 @@ export const downloadPackage = async ({
|
||||
onStatus?.("downloading");
|
||||
|
||||
// 下载重试逻辑:共10次,5次3秒,3次5秒,2次10秒
|
||||
const timeoutList = [3000, 3000, 3000, 3000, 3000, 5000, 5000, 5000, 10000, 10000];
|
||||
const timeoutList = [
|
||||
3000, 3000, 3000, 3000, 3000, 5000, 5000, 5000, 10000, 10000,
|
||||
];
|
||||
let retryCount = 0;
|
||||
let downloadSuccess = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user