111
This commit is contained in:
+21
-11
@@ -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",
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user