...
|
...
|
@@ -64,7 +64,9 @@ function getUrlParam(name) { |
|
|
|
|
|
$('.on-lingqu', 'div.main-right-use').on('click', function() {
|
|
|
var $curDom = $(this),
|
|
|
req = '';
|
|
|
req = '',
|
|
|
href = '',
|
|
|
a = '';
|
|
|
|
|
|
if (getUrlParam('app_version')) {
|
|
|
req += '&app_version=' + getUrlParam('app_version');
|
...
|
...
|
@@ -73,6 +75,8 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() { |
|
|
if (getUrlParam('uid')) {
|
|
|
req += '&uid=' + getUrlParam('uid');
|
|
|
}
|
|
|
|
|
|
|
|
|
if (!$curDom.hasClass('received')) {
|
|
|
$.ajax({
|
|
|
url: '//m.yohobuy.com/coupon/receiveCoupon?code=a83b7d55324fb65f96c1f85a3387ebd8' + req,
|
...
|
...
|
@@ -93,8 +97,11 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() { |
|
|
location.href = newUrl;
|
|
|
} else {
|
|
|
if (status) {
|
|
|
$curDom.html('').removeClass('on-receive').removeClass('no-bg');
|
|
|
$curDom.addClass('received');
|
|
|
href = $curDom.parent('.main-right-use').attr('href');
|
|
|
$curDom.parent('.main-right-use').wrap('<a class=\'main-right-use\' href=' + href + '></a>');
|
|
|
a = $curDom.parent('.main-right-use').parent('a');
|
|
|
a.html('<span class="received"></span>');
|
|
|
|
|
|
tip.show('领券成功');
|
|
|
} else {
|
|
|
tip.show(msg);
|
...
|
...
|
@@ -266,18 +273,21 @@ $('.s-activity', '.s-section').click(function() { |
|
|
});
|
|
|
$('.good-info', '.goods-list').click(function() {
|
|
|
var options;
|
|
|
var url = $(this).find('.good-detail-img').find('.good-thumb').attr('href');
|
|
|
var index = $(this).index();
|
|
|
var tid = $(this).parents('.s-section').data('template-id');
|
|
|
|
|
|
// var url = $(this).find('.good-detail-img').find('.good-thumb').attr('href');
|
|
|
// var index = $(this).index();
|
|
|
// var tid = $(this).parents('.s-section').data('template-id');
|
|
|
var index = $(this).index;
|
|
|
var goodids = $(this).find('.good-thumb').attr('href').match(/"product_skn":([^}]+)/, 'g');
|
|
|
var goodid = goodids && goodids.length === 2 ? goodids[1] : '';
|
|
|
|
|
|
options = {
|
|
|
EVENT: 'YB_STUDENT_VIP_FLR',
|
|
|
C_ID: C_ID,
|
|
|
F_ID: tid || 4,
|
|
|
F_NAME: '学生专享专区',
|
|
|
F_URL: url,
|
|
|
F_INDEX: 4,
|
|
|
I_INDEX: index
|
|
|
EVENT: 'YB_STUDENT_VIP_GDS_LIST',
|
|
|
PRD_NUM: index,
|
|
|
PRD_ID: goodid,
|
|
|
ACTION_ID: 0,
|
|
|
SORT_TYPE: 4,
|
|
|
REC_ID: Date.now()
|
|
|
};
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo(options, true);
|
...
|
...
|
|