解决读取到的微信用户头像太大问题
<script> var img = document.getElementsByTagName("img"); var str = []; var url = document.location.href; for (var i = 0; i < img.length; i++) { var src = img[i].src; if (src !== url) { str[i] = src.substring(0, src.length - 2); img[i].src = str[i] + "/46"; } else { img[i].src = "/img/emptyImageUrl.jpg"; } } </script>