...
|
...
|
@@ -297,7 +297,7 @@ function reMarginFooter(fixedElement) { |
|
|
function givePoint(parameter) {
|
|
|
var CID = 1;
|
|
|
|
|
|
if (!window._yas) {
|
|
|
if (!window._yas || !window._yas.sendCustomInfo) {
|
|
|
return false;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -8040,7 +8040,7 @@ $('#likeBtn').on('touchstart', function() { |
|
|
});
|
|
|
|
|
|
// 统计代码:用于统计用户加入或取消商品收藏的动作
|
|
|
if (window._yas) {
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
pd: productId,
|
|
|
fa: favorite
|
...
|
...
|
@@ -8065,7 +8065,7 @@ $('#addtoCart').on('touchstart', function() { |
|
|
chosePanel.show();
|
|
|
|
|
|
//统计代码:用于统计用户加入购物车的动作
|
|
|
if (window._yas) {
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
pd: productId,
|
|
|
by: 1
|
...
|
...
|
@@ -12370,6 +12370,205 @@ var jQuery = require("jquery"); |
|
|
})(jQuery);
|
|
|
});
|
|
|
define("js/me/index", ["jquery","swiper","lazyload","index"], function(require, exports, module){
|
|
|
<<<<<<< HEAD
|
|
|
=======
|
|
|
/**
|
|
|
* 个人中心首页
|
|
|
* @author: bikai<kai.bi@yoho.cn>
|
|
|
* @date: 2015/11/12
|
|
|
*/
|
|
|
var $ = require("jquery"),
|
|
|
noticeScroll = require("js/plugin/notice-scroll");
|
|
|
|
|
|
var $userAvatar = $('.user-avatar'),
|
|
|
$listItem = $('.list-item'),
|
|
|
$studentVe = $('.students-entry');
|
|
|
var myImage = new Image(),
|
|
|
avatar;
|
|
|
|
|
|
require("js/product/recommend-for-you-user-center");
|
|
|
require("js/product/suspend-cart");
|
|
|
|
|
|
// 部分老用户没有头像,显示默认头像
|
|
|
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');
|
|
|
});
|
|
|
|
|
|
var getChannel = function() {
|
|
|
var name = window.cookie('_Channel');
|
|
|
|
|
|
return {
|
|
|
boys: 1,
|
|
|
girls: 2,
|
|
|
kids: 3,
|
|
|
lifestyle: 4
|
|
|
}[name] || 1;
|
|
|
};
|
|
|
|
|
|
$studentVe.on('click', function(){
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_STUDENT_ATTCT_INFO',
|
|
|
param: JSON.stringify({
|
|
|
C_ID: getChannel(),
|
|
|
SRC_ID: 2,
|
|
|
}),
|
|
|
}, true);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
define("js/product/recommend-for-you-user-center", ["swiper","jquery","lazyload","index"], function(require, exports, module){
|
|
|
/**
|
|
|
* 为您优选
|
|
|
* @author: bikai<kai.bi@yoho.cn>
|
|
|
* @date: 2015/11/16
|
|
|
*/
|
|
|
|
|
|
|
|
|
var Swiper = require("swiper"),
|
|
|
$ = require("jquery"),
|
|
|
lazyLoad = require("lazyload");
|
|
|
|
|
|
var $recommendForYou = $('.recommend-for-you');
|
|
|
|
|
|
$.get('/product/recommend-for-you/userCenter').then(function(html) {
|
|
|
var PRDID = [];
|
|
|
|
|
|
$recommendForYou.html(html).show();
|
|
|
lazyLoad($('img.lazy'));
|
|
|
|
|
|
//为您优选埋点 http://redmine.yoho.cn/issues/10116
|
|
|
$recommendForYou.find('.good-info').each(function() {
|
|
|
PRDID.push($(this).data('id'));
|
|
|
});
|
|
|
|
|
|
window.givePoint({
|
|
|
'REC_POSE': 110004,
|
|
|
'PRD_ID': PRDID.join(','),
|
|
|
'PRD_NUM': $('.recommend-for-you .good-info').length,
|
|
|
'ACTION_ID': 0,
|
|
|
'page_num': 1
|
|
|
});
|
|
|
|
|
|
$recommendForYou.find('.good-info').on('click', 'a', function() {
|
|
|
var index = $(this).closest('.good-info').index() + 1;
|
|
|
|
|
|
window.givePoint({
|
|
|
'REC_POSE': 110004,
|
|
|
'PRD_ID': $(this).closest('.good-info').data('id'),
|
|
|
'PRD_NUM': index,
|
|
|
'ACTION_ID': 1,
|
|
|
'page_num': 1
|
|
|
});
|
|
|
|
|
|
return true;
|
|
|
});
|
|
|
|
|
|
}).fail(function() {
|
|
|
$recommendForYou.hide();
|
|
|
});
|
|
|
});
|
|
|
define("js/me/coupons", ["jquery","hammer","mlellipsis"], function(require, exports, module){
|
|
|
var $ = require("jquery"),
|
|
|
Hammer = require("hammer"),
|
|
|
ellipsis = require("mlellipsis"),
|
|
|
loading = require("js/plugin/loading");
|
|
|
|
|
|
var employ,
|
|
|
statu = 0,
|
|
|
page = 1;
|
|
|
|
|
|
ellipsis.init();
|
|
|
|
|
|
function couponAJAX(statu, page) {
|
|
|
loading.showLoadingMask();
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/home/couponData',
|
|
|
dataType: 'html',
|
|
|
data: {
|
|
|
status: statu,
|
|
|
page: page
|
|
|
},
|
|
|
success: function(data) {
|
|
|
$('#employ').append(data);
|
|
|
window.rePosFooter();
|
|
|
loading.hideLoadingMask();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$('.yoho-footer').css('border-top', '1px solid #e0e0e0');
|
|
|
$('.employ span').each(function(index) {
|
|
|
employ = new Hammer($('.employ span')[index]);
|
|
|
employ.on('tap', function(e) {
|
|
|
$('.employ span').removeClass('active').eq(index).addClass('active');
|
|
|
$('#employ').html(' ');
|
|
|
statu = index;
|
|
|
page = 1;
|
|
|
couponAJAX(statu, page);
|
|
|
window.rePosFooter();
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
function scrollHandler() {
|
|
|
if ($(window).scrollTop() + $(window).height() > $('body').height() - 100) {
|
|
|
page++;
|
|
|
couponAJAX(statu, page);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$(window).scroll(function() {
|
|
|
window.requestAnimationFrame(scrollHandler);
|
|
|
});
|
|
|
|
|
|
couponAJAX(statu, page);
|
|
|
});
|
|
|
define("js/me/online-service", ["jquery"], function(require, exports, module){
|
|
|
/**
|
|
|
* 在线客服
|
|
|
* @author: bikai<kai.bi@yoho.cn>
|
|
|
* @date: 2015/11/16
|
|
|
*/
|
|
|
var $ = require("jquery");
|
|
|
|
|
|
var $questionTab = $('.question-tab .tab-item');
|
|
|
|
|
|
$questionTab.on('touchend', function() {
|
|
|
var clickTab = $(this).data('tab');
|
|
|
|
|
|
clickTab = '[data-tab-name="' + clickTab + '"]';
|
|
|
|
|
|
$questionTab.removeClass('current');
|
|
|
$(this).addClass('current');
|
|
|
|
|
|
$('.question-list').removeClass('current');
|
|
|
$(clickTab).addClass('current');
|
|
|
});
|
|
|
|
|
|
$('.yoho-page').on('touchstart', '.connect-item, .question-item', function() {
|
|
|
$(this).siblings().removeClass('highlight');
|
|
|
$(this).addClass('highlight');
|
|
|
}).on('touchend touchcancel', '.connect-item, .question-item', function() {
|
|
|
$(this).removeClass('highlight');
|
|
|
});
|
|
|
|
|
|
});
|
|
|
define("js/me/address", ["jquery","hammer"], function(require, exports, module){
|
|
|
>>>>>>> hotfix/point
|
|
|
/**
|
|
|
* 个人中心首页
|
|
|
* @author: bikai<kai.bi@yoho.cn>
|
...
|
...
|
|