web-view中下载微信头像跨域解决方案

时间:2024-01-12 19:40:32
let img = new Image()
// 头像地址后边添加时间戳可解决跨域问题 555.
img.src = 'http://wx.qlogo.cn/mmopen/vi_32/RnLIHfXibgFHlticiclzflpriaLsC3TS9b2Sbj05Wh3vGlhcFutt18dfkXGUt8x11e4q2KHlX4EHHaBb6XylLQW1kQ/0?timeStamp='+new Date();
img.onload = ()=>{
...
}