wx.downloadFile({
url: 'https://profile.csdnimg.cn/9/5/6/2_ordercode', //仅为示例,并非真实的资源
success (res) {
// 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
console.log(res,'res000')
if (res.statusCode === 200) {
console.log(res.tempFilePath,'tempFilePath 000')
wx.editImage({
src: res.tempFilePath, // 图片路径
complete:function(resn){
console.log(resn,'resn00')
}
})
}
}
})
wx.editImage(Object object) | 微信开放文档 支持编辑图片,保存本地。