...
|
...
|
@@ -2516,12 +2516,145 @@ define("js/home/fastclick", [], function(require, exports, module){ |
|
|
|
|
|
options = options || {};
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
});
|
|
|
define("js/index/coupon", ["jquery","swiper","index"], function(require, exports, module){
|
|
|
/**
|
|
|
* Created by Administrator on 2016/4/13.
|
|
|
*/
|
|
|
var $ = require("jquery"),
|
|
|
Swiper = require("swiper"),
|
|
|
$receive = $('.main-right-receive'),
|
|
|
$mask = $('.floor-mask'),
|
|
|
$message = $('.floor-message'),
|
|
|
$tooltip = $('.floor-tooltip'),
|
|
|
tip = require("js/plugin/tip");
|
|
|
|
|
|
var bannerSwiper;
|
|
|
|
|
|
// 获取url中的参数
|
|
|
function getUrlParam(name) {
|
|
|
|
|
|
// 构造一个含有目标参数的正则表达式对象
|
|
|
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
|
|
|
|
|
|
// 匹配目标参数
|
|
|
var r = window.location.search.substr(1).match(reg);
|
|
|
|
|
|
// 返回参数值
|
|
|
if (r != null) {
|
|
|
return r[2];
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
$receive.on('click', function() {
|
|
|
var $curDom = $(this);
|
|
|
|
|
|
$.ajax({
|
|
|
url: '/coupon/receiveCoupon',
|
|
|
data: {
|
|
|
couponID: $curDom.parents('.coupon-floor').attr('coupon-id')
|
|
|
},
|
|
|
dataType: 'json',
|
|
|
success: function(data) {
|
|
|
var msg = data.msg,
|
|
|
status = data.status;
|
|
|
|
|
|
if (data.noLogin === true) {
|
|
|
var newUrl = data.url + '?code=' + getUrlParam('code');
|
|
|
if ($('#intimacy-link').length <= 0) {
|
|
|
$('body').append('<a href=\'' + newUrl + '\' style="display:none;" id="intimacy-link">' +
|
|
|
'<span class="intimacy-link"></span></a>');
|
|
|
}
|
|
|
|
|
|
$('.intimacy-link').click();
|
|
|
} else {
|
|
|
if (status) {
|
|
|
$curDom.hide();
|
|
|
$curDom.next().show();
|
|
|
$tooltip.show();
|
|
|
|
|
|
setTimeout(function() {
|
|
|
$tooltip.hide();
|
|
|
}, 3000);
|
|
|
} else {
|
|
|
$message.find('.coupon-message-content').text(msg);
|
|
|
$mask.show();
|
|
|
$message.show();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
error:function() {
|
|
|
tip.show('网络异常!');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.coupon-floor a, .banner-top a').on('click', function() {
|
|
|
if ($(this).attr('href').length <= 0 || $(this).attr('href') === '#') {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
if ($('.banner-swiper').find('li').size() > 1) {
|
|
|
bannerSwiper = new Swiper('.banner-swiper', {
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
|
|
loop: true,
|
|
|
autoplay: 3000,
|
|
|
autoplayDisableOnInteraction: false,
|
|
|
paginationClickable: true,
|
|
|
slideElement: 'li',
|
|
|
pagination: '.banner-top .pagination-inner'
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$('.coupon-message-op-rel').on('click',function(){
|
|
|
location.reload();
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
define("js/passport/entry", ["jquery","handlebars","source-map","hammer"], function(require, exports, module){
|
|
|
/**
|
|
|
* 注册、登录、密码找回打包入口
|
|
|
* @author: xuqi<qi.xu@yoho.cn>
|
|
|
* @date: 2015/10/8
|
|
|
*/
|
|
|
|
|
|
//注册
|
|
|
require("js/passport/register/register");
|
|
|
require("js/passport/register/code");
|
|
|
require("js/passport/register/password");
|
|
|
|
|
|
//登录
|
|
|
require("js/passport/login/login");
|
|
|
require("js/passport/login/international");
|
|
|
|
|
|
//密码找回
|
|
|
require("js/passport/back/mobile");
|
|
|
require("js/passport/back/code");
|
|
|
require("js/passport/back/email");
|
|
|
require("js/passport/back/email-success");
|
|
|
require("js/passport/back/new-password");
|
|
|
|
|
|
//绑定手机
|
|
|
require("js/passport/bind/bind");
|
|
|
require("js/passport/bind/code");
|
|
|
require("js/passport/bind/password");
|
|
|
|
|
|
// 关联手机
|
|
|
require("js/passport/bind/relate");
|
|
|
=======
|
|
|
/**
|
|
|
* Whether a click is currently being tracked.
|
|
|
*
|
|
|
* @type boolean
|
|
|
*/
|
|
|
this.trackingClick = false;
|
|
|
>>>>>>> 0b01671d6ca5354acb1807f1a78fc30ecf10840e
|
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -3860,8 +3993,7 @@ var $ = require("jquery"), |
|
|
$receive = $('.main-right-receive'),
|
|
|
$mask = $('.floor-mask'),
|
|
|
$message = $('.floor-message'),
|
|
|
$tooltip = $('.floor-tooltip'),
|
|
|
tip = require("js/plugin/tip");
|
|
|
$tooltip = $('.floor-tooltip');
|
|
|
|
|
|
var bannerSwiper;
|
|
|
|
...
|
...
|
@@ -3896,13 +4028,7 @@ $receive.on('click', function() { |
|
|
status = data.status;
|
|
|
|
|
|
if (data.noLogin === true) {
|
|
|
var newUrl = data.url + '?code=' + getUrlParam('code');
|
|
|
if ($('#intimacy-link').length <= 0) {
|
|
|
$('body').append('<a href=\'' + newUrl + '\' style="display:none;" id="intimacy-link">' +
|
|
|
'<span class="intimacy-link"></span></a>');
|
|
|
}
|
|
|
|
|
|
$('.intimacy-link').click();
|
|
|
location.href = data.url + '?code=' + getUrlParam('code');
|
|
|
} else {
|
|
|
if (status) {
|
|
|
$curDom.hide();
|
...
|
...
|
@@ -3918,15 +4044,12 @@ $receive.on('click', function() { |
|
|
$message.show();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
error:function() {
|
|
|
tip.show('网络异常!');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.coupon-floor a, .banner-top a').on('click', function() {
|
|
|
if ($(this).attr('href').length <= 0 || $(this).attr('href') === '#') {
|
|
|
$('.coupon-floor a').on('click', function() {
|
|
|
if ($(this).attr('href').length <= 0) {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -3943,12 +4066,6 @@ if ($('.banner-swiper').find('li').size() > 1) { |
|
|
pagination: '.banner-top .pagination-inner'
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$('.coupon-message-op-rel').on('click',function(){
|
|
|
location.reload();
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
define("js/passport/entry", ["jquery","handlebars","source-map","hammer"], function(require, exports, module){
|
|
|
/**
|
...
|
...
|
|