代碼:
imgInfo(url){
wx.getImageInfo({
src: url,
success (res) {
console.log(res.width)
console.log(res.height)
return {width:res.width,height:res.height}
}
})
},
代碼:
imgInfo(url){
wx.getImageInfo({
src: url,
success (res) {
console.log(res.width)
console.log(res.height)
return {width:res.width,height:res.height}
}
})
},
微信小程序真機調試時出現了,Error: request:fail url not in domain list:api.xxx.com 需要把網址添加到合法域名中,見圖 --- 自用 不解釋