...
|
...
|
@@ -6,12 +6,11 @@ |
|
|
|
|
|
var $ = require('jquery'),
|
|
|
Swiper = require('yoho.iswiper'),
|
|
|
calendar = require('../guang/calendar'),
|
|
|
tip = require('../plugin/tip');
|
|
|
|
|
|
var bannerSwiper, collocationSwiper;
|
|
|
|
|
|
var nowDaysNub = 0;
|
|
|
|
|
|
// 日历弹出框显示及粉丝排行榜数据组装
|
|
|
function intimacyData(data) {
|
|
|
var $ul = $('.fan-charts-cont'),
|
...
|
...
|
@@ -19,7 +18,11 @@ function intimacyData(data) { |
|
|
$increased = $('.increased'),
|
|
|
signDay = data.signDay,
|
|
|
html = '',
|
|
|
style = '';
|
|
|
style = '',
|
|
|
nowDate = new Date(),
|
|
|
nowYear = nowDate.getFullYear(),
|
|
|
nowMonth = nowDate.getMonth(),
|
|
|
nowDaysNub = calendar.calculateMonthDays(nowMonth, nowYear);
|
|
|
|
|
|
var i;
|
|
|
|
...
|
...
|
@@ -49,11 +52,19 @@ function intimacyData(data) { |
|
|
|
|
|
$ul.html(html);
|
|
|
|
|
|
$myIntimacy.find('span').html(data.intimacyNum);
|
|
|
$increased.find('span').html(data.intimacyNum);
|
|
|
$myIntimacy.find('span').html(data.todayIntimacy);
|
|
|
$increased.find('span').html(data.todayIntimacy);
|
|
|
|
|
|
if (data.intimacyNum === 0) {
|
|
|
$('.my-intimacy').hide();
|
|
|
$('.increased').show();
|
|
|
} else {
|
|
|
$('.my-intimacy').show();
|
|
|
$('.increased').hide();
|
|
|
}
|
|
|
|
|
|
$('.pop-intimacy').show();
|
|
|
$('.mask').show();
|
|
|
$('.classroom-mask').show();
|
|
|
$('body').css({
|
|
|
overflow: 'hidden'
|
|
|
});
|
...
|
...
|
@@ -185,12 +196,11 @@ $('.add-intimacy').on('click', function() { |
|
|
var code = data.code;
|
|
|
|
|
|
if (code === 200) {
|
|
|
if (data.intimacyNum === 0) {
|
|
|
$('.my-intimacy').hide();
|
|
|
$('.increased').show();
|
|
|
} else {
|
|
|
intimacyData(data.data);
|
|
|
}
|
|
|
intimacyData(data.data);
|
|
|
}
|
|
|
|
|
|
if (code === 201) {
|
|
|
window.location = data.data;
|
|
|
}
|
|
|
},
|
|
|
error: function() {
|
...
|
...
|
@@ -200,9 +210,9 @@ $('.add-intimacy').on('click', function() { |
|
|
});
|
|
|
|
|
|
// 关闭日历弹出窗事件
|
|
|
$('.pop-intimacy .pop-close, .mask').on('click', function() {
|
|
|
$('.pop-intimacy .pop-close, .classroom-mask').on('click', function() {
|
|
|
$('.pop-intimacy').hide();
|
|
|
$('.mask').hide();
|
|
|
$('.classroom-mask').hide();
|
|
|
|
|
|
$('body').css({
|
|
|
overflow: 'visible'
|
...
|
...
|
|