...
|
...
|
@@ -52,13 +52,15 @@ function setAvatar($userAvatar) { |
|
|
// 部分老用户没有头像,显示默认头像
|
|
|
avatar = $userAvatar.data('avatar');
|
|
|
|
|
|
if (avatar) {
|
|
|
myImage.src = avatar;
|
|
|
}
|
|
|
|
|
|
myImage.onload = function() {
|
|
|
$userAvatar.css('background-image', 'url(' + avatar + ')');
|
|
|
};
|
|
|
|
|
|
if (avatar) {
|
|
|
myImage.src = avatar;
|
|
|
} else {
|
|
|
$userAvatar.addClass('default-avater');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
@@ -80,23 +82,18 @@ function bindAvatar(dom) { |
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
// else if (window.queryString.app_version) {
|
|
|
// return false;
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
function setIndexAction() {
|
|
|
var starIScroll;
|
|
|
|
|
|
var commonHeaderTop = $('#yoho-header').outerHeight(),
|
|
|
$loadingTip = $('.loading-tip'),
|
|
|
var $loadingTip = $('.loading-tip'),
|
|
|
$avatarWrap = $('.avatar-wrap:not(.avatar-clone)'),
|
|
|
avatarHeight = $('.avatar').height();
|
|
|
|
|
|
// 下拉刷新,上拉加载
|
|
|
starIScroll = new PullRefresh('.star-wrap', {
|
|
|
height: $(window).height() - commonHeaderTop - avatarHeight,
|
|
|
height: $(window).height() - avatarHeight,
|
|
|
pullDown: function() {
|
|
|
if (!stopLoading) {
|
|
|
stopLoading = true;
|
...
|
...
|
@@ -219,14 +216,16 @@ function setIndexAction() { |
|
|
}
|
|
|
|
|
|
$('.rank-avatar').each(function(key, item) {
|
|
|
if ($(item).attr('data-avatar') !== '') {
|
|
|
setAvatar($(item));
|
|
|
}
|
|
|
setAvatar($(item));
|
|
|
});
|
|
|
|
|
|
$('#yoho-header, .head-tab').on('touchmove', function() {
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
$('.artice-imgs-area img').on('load', function() {
|
|
|
starIScroll.iScroll.refresh();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|