Authored by 王水玲

新潮教室默认头像bug修改

... ... @@ -26,6 +26,7 @@ function intimacyData(data) {
style = '',
bgStyle = '',
nowDate = new Date(),
myImage = new Image(),
nowYear = nowDate.getFullYear(),
nowMonth = nowDate.getMonth(),
nowDaysNub = calendar.calculateMonthDays(nowMonth, nowYear);
... ... @@ -49,8 +50,11 @@ function intimacyData(data) {
style = '';
}
if (data.fanCharts[i].img !== '') {
bgStyle = 'background-image:url(' + data.fanCharts[i].img + ')';
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 + ')';
};
} else {
bgStyle = '';
}
... ...