...
|
...
|
@@ -6,26 +6,21 @@ |
|
|
|
|
|
var $ = require('jquery'),
|
|
|
lazyLoad = require('yoho.lazyload'),
|
|
|
// Hammer = require('yoho.hammer'),
|
|
|
Handlebars = require('yoho.handlebars'),
|
|
|
tip = require('../plugin/tip'),
|
|
|
loading = require('../plugin/loading'),
|
|
|
order = require('./order-info');
|
|
|
|
|
|
var dispatchModeHammer,
|
|
|
dispatchTimeHammer,
|
|
|
$invoice = $('.invoice'),
|
|
|
$price = $('.price-cal'),
|
|
|
var $invoice = $('.invoice'),
|
|
|
$couponUse = $('.coupon-use.used'),
|
|
|
$addressWrap = $('.address-wrap'),
|
|
|
$coinCheck = $('.coin-check'),
|
|
|
$coinUsed = $('.coin .used'),
|
|
|
$subBlock = $('.sub-block'),
|
|
|
payType,
|
|
|
// priceTmpl = Handlebars.compile($('#tmpl-price').html()),
|
|
|
queryString = $.queryString(),
|
|
|
orderInfo = order.orderInfo,
|
|
|
isSubmiting;
|
|
|
isSubmiting,
|
|
|
dispatchInfo;
|
|
|
|
|
|
require('../common');
|
|
|
|
...
|
...
|
@@ -72,7 +67,7 @@ isLimitGood() && (function() { |
|
|
|
|
|
var data = getQueryParam();
|
|
|
|
|
|
data['type'] = 'limitcode';
|
|
|
data.type = 'limitcode';
|
|
|
|
|
|
a.push(data);
|
|
|
orderInfo('skuList', JSON.stringify(a));
|
...
|
...
|
@@ -94,12 +89,6 @@ function dispacthTapEvt(e) { |
|
|
$cur.addClass('chosed');
|
|
|
}
|
|
|
|
|
|
// dispatchModeHammer = new Hammer(document.getElementsByClassName('dispatch-mode')[0]);
|
|
|
// dispatchModeHammer.on('tap', dispacthTapEvt);
|
|
|
|
|
|
// dispatchTimeHammer = new Hammer(document.getElementsByClassName('dispatch-time')[0]);
|
|
|
// dispatchTimeHammer.on('tap', dispacthTapEvt);
|
|
|
|
|
|
$('.checkbox').on('touchstart', function() {
|
|
|
var $this = $(this);
|
|
|
|
...
|
...
|
@@ -139,7 +128,6 @@ function orderCompute() { |
|
|
skuList: isLimitGood() ? orderInfo('skuList') : undefined
|
|
|
}
|
|
|
}).then(function(res) {
|
|
|
var priceHtml;
|
|
|
|
|
|
if ($.type(res) !== 'object') {
|
|
|
window.location.reload();
|
...
|
...
|
@@ -153,12 +141,6 @@ function orderCompute() { |
|
|
$coinCheck.find('em').show();
|
|
|
$coinUsed.show();
|
|
|
}
|
|
|
// priceHtml = priceTmpl({
|
|
|
// cartPayData: res.promotion_formula_list,
|
|
|
// price: res.last_order_amount
|
|
|
// });
|
|
|
|
|
|
// $price.html(priceHtml);
|
|
|
}
|
|
|
}).fail(function() {
|
|
|
window.location.reload();
|
...
|
...
|
@@ -305,7 +287,6 @@ $('.pay-mode').on('click', 'li', function() { |
|
|
orderInfo('paymentTypeId', $this.data('pay-id'));
|
|
|
orderInfo('paymentType', $this.data('pay-type'));
|
|
|
payType = $this.data('pay-type');
|
|
|
// submitOrder();
|
|
|
});
|
|
|
|
|
|
$('form').on('submit', function() {
|
...
|
...
|
@@ -339,8 +320,15 @@ $subBlock.on('touchstart', 'i', function() { |
|
|
});
|
|
|
|
|
|
|
|
|
$('.bill a').on('touchstart', function(){
|
|
|
$('.bill a').on('touchstart', function() {
|
|
|
orderInfo('paymentTypeId', $('.delivery-id .icon-cb-radio').data('id'));
|
|
|
orderInfo('paymentType', $('.delivery-time .icon-cb-radio').data('id'));
|
|
|
submitOrder();
|
|
|
}) |
|
|
\ No newline at end of file |
|
|
});
|
|
|
|
|
|
function phoneHidden(phone) {
|
|
|
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
|
|
}
|
|
|
|
|
|
$('.info-phone').html(phoneHidden($('.info-phone').html()));
|
|
|
|
...
|
...
|
|