1.14提交
This commit is contained in:
@@ -138,6 +138,7 @@
|
||||
const innerSortTitle = ref("上传时间");
|
||||
import downloadStore from "@/store/downloadStoreFile.js";
|
||||
const downloadTasks=ref([]);
|
||||
import isAndroid from "@/utils/platform.js";
|
||||
const downLoadtaskList=computed(()=>{
|
||||
return downloadTasks.value.filter((item)=>item.status == "completed" && item.type == "zhinan");
|
||||
});
|
||||
@@ -238,6 +239,7 @@
|
||||
if(item.id == cell.id) {
|
||||
console.log(2222222222);
|
||||
console.log(item.localPath);
|
||||
if(isAndroid){
|
||||
plus.runtime.openFile(item.localPath, function(e) {
|
||||
console.log('打开成功');
|
||||
}, function(e) {
|
||||
@@ -248,6 +250,29 @@
|
||||
});
|
||||
console.log('打开失败:' + e.message);
|
||||
});
|
||||
}else{
|
||||
uni.openDocument({
|
||||
filePath: item.localPath,
|
||||
success: () => console.log('打开成功'),
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: '打开失败:' + err.message,
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 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',
|
||||
|
||||
Reference in New Issue
Block a user