Authored by lijing

vipinfo

... ... @@ -11,6 +11,7 @@
const favApi = global.yoho.FavAPI;
const api = global.yoho.API;
const helpers = global.yoho.helpers;
const camelCase = global.yoho.camelCase;
/**
* 个人详情数据
... ... @@ -81,7 +82,6 @@ const index = (params) => {
Object.assign(finalResult, {
profileName: result[0].data.profile_name,
headIco: result[0].data.head_ico,
curLevel: result[0].data.cur_level,
vipInfo: result[0].data.vip_info
});
}
... ... @@ -112,7 +112,7 @@ const index = (params) => {
}
return finalResult;
return camelCase(finalResult);
});
};
... ...
require('./recommend-for-you-user-center');
/**
* 个人中心首页
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/12
*/
var $ = require('yoho-jquery'),
noticeScroll = require('../plugin/notice-scroll');
var $userAvatar = $('.user-avatar'),
$listItem = $('.list-item');
var myImage = new Image(),
avatar;
require('../common');
require('./recommend-for-you-user-center');
require('../product/suspend-cart.js');
// 部分老用户没有头像,显示默认头像
avatar = $userAvatar.data('avatar');
myImage.src = avatar;
myImage.onload = function() {
$userAvatar.css('background-image', 'url(' + avatar + ')');
};
noticeScroll('.notice', $('.notice').data('time') * 1000);
$('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', function() {
$listItem.removeClass('highlight');
$(this).addClass('highlight');
}).on('touchend touchcancel', '.list-item, .type-item, .order-title', function() {
$(this).removeClass('highlight');
});
... ...
/**
* 悬浮购物车
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/11/1
*/
var $ = require('yoho-jquery');
var $cart = $('#suspend-cart');
$.ajax({
type: 'GET',
url: '/cart/index/count',
success: function(data) {
var count;
if (data.code === 200) {
count = data.data.cart_goods_count;
if (count > 99) {
count = '99+';
}
if (count === 0) {
$('.cart-count').remove();
}
$cart.find('.cart-count').html(count).removeClass('hide');
}
}
});
... ...
... ... @@ -89,7 +89,7 @@
padding: 6px 0;
text-align: center;
background: rgba(0,0,0,0.8);
height: 76px;
height: 89px;
.link-item {
position: relative;
... ...