Authored by yangyang

Merge branch 'feature/xingchao' of http://git.dev.yoho.cn/web/yohobuy into feature/xingchao

This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -76,12 +76,14 @@ if ($('.collocation-list').find('li').length === 0) {
}
// 星搭配收藏请求
$(document).on('click', '.collection', function() {
$(document).on('touchstart', '.collection', function() {
var $that = $(this),
$icon = $that.find('.collected-ico');
var type;
event.stopPropagation();
if ($icon.hasClass('collected')) {
type = 'del';
} else {
... ...
... ... @@ -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',
... ...