|
@@ -25,6 +25,8 @@ define(['$', 'template', 'IScroll', 'product', 'user', 'native', 'config', 'addr
|
|
|
/* this是什么? */
|
|
|
var $view = this;
|
|
|
var $doc = $(document);
|
|
|
+ /*提示信息*/
|
|
|
+
|
|
|
|
|
|
/* 定义按钮事件。
|
|
|
* 为什么不是$(selector).onclick(function)呢?
|
|
@@ -45,6 +47,24 @@ define(['$', 'template', 'IScroll', 'product', 'user', 'native', 'config', 'addr
|
|
|
|
|
|
native.call('4000328170');
|
|
|
}, $view);
|
|
|
+ //加载弹框
|
|
|
+ setTimeout(function () {
|
|
|
+ $doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
|
+ message: '您已获得双十一大礼包',
|
|
|
+ // title: '系统通知',
|
|
|
+ // html: '您已获得双十一大礼包',
|
|
|
+ buttons: [{text: '我知道了', class: 'btn-primary'}]
|
|
|
+ }]);
|
|
|
+ }, 100);
|
|
|
+ $.newTouch('.alert-btn-box', function (event) {
|
|
|
+ event.preventDefault();
|
|
|
+ $doc.trigger('spa:navigate', {
|
|
|
+ hash: 'myCoupon',
|
|
|
+ pushData: {
|
|
|
+ needReload: true
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, $view);
|
|
|
//点击banner-1进入充值卡页
|
|
|
$.newTouch('.btn-banner-recharge', function (event) {
|
|
|
event.preventDefault();
|
|
@@ -55,7 +75,9 @@ define(['$', 'template', 'IScroll', 'product', 'user', 'native', 'config', 'addr
|
|
|
}
|
|
|
});
|
|
|
}, $view);
|
|
|
- //点击banner-2进入充值卡页面
|
|
|
+
|
|
|
+
|
|
|
+ //点击banner-2进入优惠券
|
|
|
$.newTouch('.btn-banner-coupon', function (event) {
|
|
|
event.preventDefault();
|
|
|
$doc.trigger('spa:navigate', {
|
|
@@ -246,17 +268,17 @@ define(['$', 'template', 'IScroll', 'product', 'user', 'native', 'config', 'addr
|
|
|
setTimeout(function () {
|
|
|
pageData.scroll = new IScroll('#homeScroll');
|
|
|
var swiper = new Swiper('.swiper-container', {
|
|
|
- /* paginationClickable: true,
|
|
|
+ /* paginationClickable: true,
|
|
|
+ pagination: '.pagination',
|
|
|
+ spaceBetween: 30,
|
|
|
+ centeredSlides: true,
|
|
|
+ autoplay: 1500,
|
|
|
+ autoplayDisableOnInteraction: false*/
|
|
|
pagination: '.pagination',
|
|
|
- spaceBetween: 30,
|
|
|
- centeredSlides: true,
|
|
|
- autoplay: 1500,
|
|
|
- autoplayDisableOnInteraction: false*/
|
|
|
- pagination: '.pagination',
|
|
|
- loop : true,
|
|
|
+ loop: true,
|
|
|
paginationClickable: true,
|
|
|
centeredSlides: true,
|
|
|
- autoplay: 1500,
|
|
|
+ autoplay: 1500,
|
|
|
autoplayDisableOnInteraction: false
|
|
|
});
|
|
|
$('.swiper-container').height($('.swiper-container img').height());
|