let timeJy=new Date().getTime();//随机数
let filePath= wx.env.USER_DATA_PATH + "/jy"+timeJy+".pdf";
wx.downloadFile({
url: "路径",
filePath:filePath,
success: function (res) {
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
}
})
}
})