...
|
...
|
@@ -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'),
|
...
|
...
|
@@ -26,6 +35,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 +59,9 @@ 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;
|
|
|
bgStyle = loadIntimacyAvatar(myImage, data.fanCharts[i].img);
|
|
|
} else {
|
|
|
bgStyle = '';
|
|
|
}
|
...
|
...
|
@@ -167,10 +178,12 @@ if ($('.home-floor-sign').length > 0) { |
|
|
}
|
|
|
|
|
|
// 星鲜事点赞事件
|
|
|
$(document).on('click', '.like-ico', function() {
|
|
|
$(document).on('touchstart', '.like-ico', function() {
|
|
|
var $that = $(this),
|
|
|
addString = '';
|
|
|
|
|
|
event.stopPropagation();
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/guang/starclass/setPraise',
|
...
|
...
|
|