wx.downloadFile({
url: ‘https://cynthianc.github.io/images/123.pdf’,
success: function (res) {
var filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log(‘打开文档成功’)
console.log(res)
},
fail: function (res) {
console.log(‘fail’)
console.log(res)
},
complete: function (res) {
console.log(‘complete’)
console.log(res)
}
})
},
fail: function (res) {
console.log(‘fail’)
console.log(res)
},
complete: function (res) {
console.log(‘complete’)
console.log(res)
}
})
借用了网上的代码 发现预览下只有调试模式才能时不时打开 一点也不稳定 求问各路大神是什么问题?