12.2提交

This commit is contained in:
zoujiandong
2025-12-02 15:24:51 +08:00
parent 9788e723a2
commit 60531b339e
11 changed files with 93 additions and 45 deletions
+15 -8
View File
@@ -108,9 +108,7 @@ const innerSortTitle=ref('上传时间');
import downloadStore from "@/store/downloadStoreFile.js";
const downloadTasks=ref([]);
const downLoadtaskList=computed(()=>{
console.log('downLoadtaskList');
console.log(downloadTasks.value.map((item)=>item.id));
return downloadTasks.value.map((item)=>item.id);
return downloadTasks.value.filter((item)=>item.status == "completed").map((item)=>item.id);
});
const chooseInnerSort=(index)=>{
sort.value=index;
@@ -396,15 +394,24 @@ const viewGuideline = (cell) => {
});
return;
}
console.log('下载列表');
console.log(downloadTasks.value);
downloadTasks.value.forEach(item => {
if(item.id == cell.uuid) {
uni.openDocument({
filePath: item.localPath,
fileType: 'pdf',
success: () => console.log('打开成功'),
fail: (err) => console.error('打开失败', err)
fail: (err) => {
uni.showToast({
title: err,
icon: "none",
});
}
});
}
});
}
@@ -464,12 +471,12 @@ const startDownload = (index) => {
const taskItem = downloadStore.getTask(index);
if (!taskItem) return;
if(taskItem.status == "loading"){
uni.showToast({
title: "正在下载",
icon: "none",
});
return false;
};
uni.showToast({
title: "正在下载中",
icon: "none",
});
downloadStore.updateTask(index, {
status: "loading"
});