统一先下载
uni.downloadFile({
url:https://xxxx.pdf,
success: res => {
// #ifdef H5
const el = document.createElement('a')
el.href = res.tempFilePath
el.download = file.name
el.style.display = 'none'
document.body.appendChild(el)
el.click()
el.parentNode.removeChild(el)
// #endif
// #ifndef H5
uni.openDocument({
filePath: res.tempFilePath,
fileType:'pdf'
})
// #endif
}
})