const handleWechatQRCodeHeight = () => {
const { wechatQRCode } = getAdminInfo()
Image.getSize(wechatQRCode, (width, height) => {
let wechatQRCodeHeight = (height / width) * 300
console.log(wechatQRCodeHeight)
setWechatQRCodeHeight(wechatQRCodeHeight)
})
}
useEffect(() => {
handleWechatQRCodeHeight()
// eslint-disable-next-line
}, [])
<Image
style={{
...styles.mExchangeWechatQRCode,
height: wechatQRCodeHeight,
}}
uri={wechatQRCode}
resizeMode={'cover'}
></Image>