wx.openDocument兼容性问题
安卓6.0,微信6.5.10
console.log报:openDocument:fail user cancel
代码:
viewDocument: function(e) {
var that = this;
this.setData({buttonText: ‘下载中…’});
this.download(this.data.url, function (res) {
that.setData({ buttonText: ‘查看原文件’ });
wx.openDocument({
filePath: res.tempFilePath,
success: function () {
},
fail:function(res){
console.log(res);
}
});
});
},