- 【小程序】安卓分享pdf为.bin格式,该如何解决?
downloadFile下载获取的pdf后缀是.bin,openDocument之后 ios分享给好友是 pdf 格式 但是安卓分享是 .bin 格式 。请问该如何解决 ,代码如下: uni.downloadFile({ url: response.data.data, success: function (res) { console.log('下载的res', res) var filePath = res.tempFilePath; console.log(filePath); uni.openDocument({ filePath: filePath, showMenu: true, fileType: 'pdf', success: function (res) { uni.hideLoading() console.log('打开文档成功') }, fail: function (err) { uni.hideLoading() uni.showToast({ title: '打开失败', duration: 1500, icon: 'none' }) console.log('打开失败') } }) }, fail: function (err) { console.log('下载失败原因', err) uni.hideLoading() setTimeout(() => { uni.showToast({ title: '下载失败', duration: 1500, icon: 'none' }) }, 1500) } })
2022-04-29 - 小程序点击事件,点击一次,触发两次,问题下怎么解决? 不是bindtap换catchTap问题
我就一个点击事件,然后,没有其他点击事件,只点击一次,但是会触发两次,后台返回的数据,一次成功,一次失败,有没有大神帮解决这个问题。
2019-12-05