diff --git a/pages_app/zhinanList/zhinanList.vue b/pages_app/zhinanList/zhinanList.vue index 34a51da..c22a25e 100644 --- a/pages_app/zhinanList/zhinanList.vue +++ b/pages_app/zhinanList/zhinanList.vue @@ -453,23 +453,40 @@ 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.showModal({ - title: '提示', - content: JSON.stringify(err), - showCancel: false, - confirmText: '确定', - success: (res) => { - if(res.confirm){ - } - } - }); - } - }); + console.log(2222222222); + console.log(item.localPath); + plus.runtime.openFile(item.localPath, function(e) { + console.log('打开成功'); + }, function(e) { + uni.showModal({ + title: '提示', + content: JSON.stringify(e), + showCancel: false, + confirmText: '确定', + success: (res) => { + if(res.confirm){ + } + } + }); + console.log('打开失败:' + e.message); + }); + // uni.openDocument({ + // filePath: item.localPath, + // fileType: 'pdf', + // success: () => console.log('打开成功'), + // fail: (err) => { + // uni.showModal({ + // title: '提示', + // content: JSON.stringify(err), + // showCancel: false, + // confirmText: '确定', + // success: (res) => { + // if(res.confirm){ + // } + // } + // }); + // } + // }); // let url = "https://view.xdocin.com/view?src=" + encodeURIComponent(pdfUrl); // uni.downloadFile({ // url: pdfUrl,