Created
March 7, 2019 07:49
-
-
Save xuyazhong/f481cb9cf3ec66b672716e802b8280d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wx.downloadFile({ | |
url: path, | |
success(res) { | |
const downloadPath = res.tempFilePath | |
console.log('downloadPath =>', downloadPath) | |
wx.openDocument({ | |
filePath: downloadPath, | |
fileType: 'pdf', | |
success(res) { | |
console.log('打开文档成功 =>', res) | |
}, | |
fail (err) { | |
console.log('打开失败 =>', err) | |
} | |
}) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment