wx.getImageInfo({//下载图片src:,//这里放你要下载图片的数组(多张)或字符串(一张)下面代码不用改动success:function(ret){varpath=ret.path;//console.log(ret)//console.log(path)wx.saveImageToPhotosAlbum({filePath:path,success(result){console.log("成功");if(i==xin1.length){wx.hideLoading();wx.showToast({title:'下载图片成功',duration:2000,mask:true,});}},fail(result){console.log("失败,你取消了"+JSON.stringify(result))console.log(path);wx.openSetting({success:(res)={console.log(res);}})}});}});

TAG标签: 微信小程序小程序下载微信图片

http://www.xiaochengxub.com/read-107993.html