...
|
...
|
@@ -10,6 +10,8 @@ var $btnby = $('input.btnby'), |
|
|
amount = $btnby.data('amount'),
|
|
|
$formGo = $('.form-go'),
|
|
|
Alert = dialog.Alert,
|
|
|
time = $('.js-time').data('time'),
|
|
|
$timer = $('.js-timer'),
|
|
|
C_ID;
|
|
|
|
|
|
require('../simple-header');
|
...
|
...
|
@@ -21,6 +23,8 @@ payPage = { |
|
|
this.goPay();
|
|
|
},
|
|
|
setEvent: function() {
|
|
|
var self = this;
|
|
|
|
|
|
// tab切 事件
|
|
|
$('ul.tabs').on('click', function(e) {
|
|
|
var $li = $(e.target).closest('li');
|
...
|
...
|
@@ -55,6 +59,11 @@ payPage = { |
|
|
document.location.href = '//www.yohobuy.com/home/orders';
|
|
|
});
|
|
|
});
|
|
|
|
|
|
this.setTimer();
|
|
|
setInterval(function() {
|
|
|
self.setTimer();
|
|
|
}, 1000);
|
|
|
},
|
|
|
goPay: function() {
|
|
|
var payType;
|
...
|
...
|
@@ -128,6 +137,21 @@ payPage = { |
|
|
}
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
setTimer: function() {
|
|
|
var hour = Math.floor(time / 3600);
|
|
|
var minus = Math.floor((time % 3600) / 60);
|
|
|
var second = time % 60;
|
|
|
var text = '';
|
|
|
|
|
|
if (hour > 0) {
|
|
|
text += hour + '小时';
|
|
|
}
|
|
|
|
|
|
text += minus + '分' + second + '秒';
|
|
|
|
|
|
$timer.text(text);
|
|
|
time--;
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
|