Authored by 王水玲

新潮教室默认头像bug修改

... ... @@ -16,6 +16,15 @@ lazyLoad($('img.lazy'));
$('body').addClass('star-class-body');
function loadIntimacyAvatar(myImage, src) {
var newSrc = '';
myImage.onload = function() {
newSrc = 'background-image:url(' + src + ')';
};
return newSrc;
}
// 日历弹出框显示及粉丝排行榜数据组装
function intimacyData(data) {
var $ul = $('.fan-charts-cont'),
... ... @@ -52,9 +61,7 @@ function intimacyData(data) {
if (data.fanCharts[i].img !== '' && data.fanCharts[i].img !== null) {
myImage.src = data.fanCharts[i].img;
myImage.onload = function() {
bgStyle = 'background-image:url(' + data.fanCharts[i].img + ')';
};
bgStyle = loadIntimacyAvatar(myImage, data.fanCharts[i].img);
} else {
bgStyle = '';
}
... ...