|
@@ -15,13 +15,21 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- function payCharge(a,b){
|
|
|
|
- console.log($(a));
|
|
|
|
|
|
+ function payCharge(a,b,time){
|
|
var c=parseInt($(a).text());
|
|
var c=parseInt($(a).text());
|
|
if(b){
|
|
if(b){
|
|
- c++;
|
|
|
|
|
|
+ if(time=='month'){
|
|
|
|
+ if(c<12){
|
|
|
|
+ c++;
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ c++;
|
|
|
|
+ }
|
|
|
|
+
|
|
}else {
|
|
}else {
|
|
- c--;
|
|
|
|
|
|
+ if(c>1){
|
|
|
|
+ c--;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
$(a).text(c)
|
|
$(a).text(c)
|
|
}
|
|
}
|
|
@@ -59,6 +67,9 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
$('#reviewContainer').show();
|
|
$('#reviewContainer').show();
|
|
|
|
+ year=$('.year-span').text();
|
|
|
|
+ month=$('.month-span').text();
|
|
|
|
+ console.log(month);
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
pageData.scroll = new IScroll('#orderContainer');
|
|
pageData.scroll = new IScroll('#orderContainer');
|
|
}, 100);
|
|
}, 100);
|
|
@@ -81,19 +92,19 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
|
|
// 加减
|
|
// 加减
|
|
$.newTouch('.btn-year-add',function(event){
|
|
$.newTouch('.btn-year-add',function(event){
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
- payCharge($('.modal-box-year'),true);
|
|
|
|
|
|
+ payCharge($('.modal-box-year'),true,'year');
|
|
},$view);
|
|
},$view);
|
|
$.newTouch('.btn-year-sub',function(event){
|
|
$.newTouch('.btn-year-sub',function(event){
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
- payCharge($('.modal-box-year'),false);
|
|
|
|
|
|
+ payCharge($('.modal-box-year'),false,'month');
|
|
},$view);
|
|
},$view);
|
|
$.newTouch('.btn-month-add',function(event){
|
|
$.newTouch('.btn-month-add',function(event){
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
- payCharge($('.modal-box-month'),true);
|
|
|
|
|
|
+ payCharge($('.modal-box-month'),true,'year');
|
|
},$view);
|
|
},$view);
|
|
$.newTouch('.btn-month-sub',function(event){
|
|
$.newTouch('.btn-month-sub',function(event){
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
- payCharge($('.modal-box-month'),false);
|
|
|
|
|
|
+ payCharge($('.modal-box-month'),false,'month');
|
|
},$view);
|
|
},$view);
|
|
// 取消
|
|
// 取消
|
|
$.newTouch('.cancel',function(event){
|
|
$.newTouch('.cancel',function(event){
|
|
@@ -105,7 +116,8 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
|
|
$.newTouch('.determine',function(event){
|
|
$.newTouch('.determine',function(event){
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
$('.modal-box').css('display','none')
|
|
$('.modal-box').css('display','none')
|
|
- console.log('测试');
|
|
|
|
|
|
+ $('.year-span').text($('.modal-box-year').text());
|
|
|
|
+ $('.month-span').text($('.modal-box-month').text());
|
|
},$view);
|
|
},$view);
|
|
|
|
|
|
|
|
|