This commit is contained in:
zoujiandong
2025-12-03 10:20:33 +08:00
parent 1785e9309e
commit f4c8df1950
3 changed files with 49 additions and 56 deletions
+21 -11
View File
@@ -398,17 +398,27 @@ const viewGuideline = (cell) => {
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) => {
uni.showToast({
title: err,
icon: "none",
});
}
});
plus.runtime.openFile(item.localPath, function(e) {
console.log('打开成功');
}, function(e) {
uni.showToast({
title: '打开失败:' + e.message,
icon: "none",
duration: 2000,
});
console.log('打开失败:' + e.message);
});
// uni.openDocument({
// filePath: item.localPath,
// fileType: 'pdf',
// success: () => console.log('打开成功'),
// fail: (err) => {
// uni.showToast({
// title: err,
// icon: "none",
// });
// }
// });
}
});