...
|
...
|
@@ -6,9 +6,12 @@ |
|
|
|
|
|
var $ = require('jquery'),
|
|
|
lazyLoad = require('yoho.lazyload'),
|
|
|
Hammer = require('yoho.hammer');
|
|
|
Hammer = require('yoho.hammer'),
|
|
|
orderInfo = require('./order-info').orderInfo;
|
|
|
|
|
|
var dispatchModeHammer, dispatchTimeHammer;
|
|
|
var dispatchModeHammer,
|
|
|
dispatchTimeHammer,
|
|
|
$invoice = $('.invoice');
|
|
|
|
|
|
lazyLoad();
|
|
|
|
...
|
...
|
@@ -51,3 +54,42 @@ $('.invoice').on('touchend', '.checkbox', function() { |
|
|
$('.invoice').removeClass('focus');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 界面点击,状态存 cookie
|
|
|
$('.dispatch-mode').on('touchend', 'li', function() {
|
|
|
orderInfo('deliveryId', $(this).data('id'));
|
|
|
});
|
|
|
|
|
|
$('.dispatch-time').on('touchend', 'li', function() {
|
|
|
orderInfo('deliveryTimeId', $(this).data('id'));
|
|
|
});
|
|
|
|
|
|
$('.coin').on('touchend', function() {
|
|
|
var $this = $(this);
|
|
|
|
|
|
if ($this.find('.checkbox').hasClass('icon-cb-checked')) {
|
|
|
orderInfo('yohoCoin', $this.data('yoho-coin'));
|
|
|
} else {
|
|
|
orderInfo('yohoCoin', 0);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$invoice.on('touchend', function() {
|
|
|
var $this = $(this);
|
|
|
|
|
|
orderInfo('invoice', $this.find('.checkbox').hasClass('icon-cb-checked'));
|
|
|
});
|
|
|
|
|
|
$invoice.find('[name="invoice-title"]').on('blur', function() {
|
|
|
orderInfo('invoiceText', $(this).val());
|
|
|
}).end().find('.invoice-type').on('change', function() {
|
|
|
orderInfo('invoiceType', $(this).val());
|
|
|
});
|
|
|
|
|
|
$('#msg').find('input').on('blur', function() {
|
|
|
orderInfo('msg', $(this).val());
|
|
|
});
|
|
|
|
|
|
$('.pay-mode').on('click', 'li', function() {
|
|
|
orderInfo('paymentTypeId', $(this).data('pay-id'));
|
|
|
}); |
...
|
...
|
|