...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2017-06-21 10:30:21
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2017-06-22 11:36:42
|
|
|
* @Last Modified time: 2017-06-22 13:50:36
|
|
|
*/
|
|
|
require('buynow/order-ensure.page.css');
|
|
|
const $ = require('yoho-jquery');
|
...
|
...
|
@@ -11,7 +11,7 @@ const cookie = require('yoho-cookie'); |
|
|
|
|
|
let tip = require('plugin/tip'),
|
|
|
loading = require('plugin/loading'),
|
|
|
order = require('../cart/order-info'),
|
|
|
order = require('./order-info'),
|
|
|
richTip = require('plugin/rich-tip');
|
|
|
|
|
|
let $invoice = $('.invoice'),
|
...
|
...
|
@@ -131,7 +131,7 @@ $invoice.on('touchend', '.checkbox', function() { |
|
|
});
|
|
|
|
|
|
|
|
|
function updateDeliverId(id) {
|
|
|
function updateDeliverWay(deliver_way) {
|
|
|
let $moreJit = $('.more-jit a').get(0),
|
|
|
url;
|
|
|
|
...
|
...
|
@@ -142,18 +142,18 @@ function updateDeliverId(id) { |
|
|
}
|
|
|
|
|
|
if (url.indexOf('deliveryId') < 0) {
|
|
|
$moreJit.href = url + '&deliveryId=' + id;
|
|
|
$moreJit.href = url + '&deliveryId=' + deliver_way;
|
|
|
} else {
|
|
|
$moreJit.href = url.replace(/deliveryId=(\d)/, 'deliveryId=' + id);
|
|
|
$moreJit.href = url.replace(/deliveryId=(\d)/, 'deliveryId=' + deliver_way);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function orderCompute() {
|
|
|
let yohoCoin = orderInfo('yohoCoin'),
|
|
|
deliverId = orderInfo('deliveryId'),
|
|
|
deliver_way = orderInfo('delivery_way'),
|
|
|
data = {
|
|
|
cart_type: orderInfo('cartType') || 'ordinary',
|
|
|
delivery_way: orderInfo('deliveryId'),
|
|
|
delivery_way: orderInfo('delivery_way'),
|
|
|
payment_type: orderInfo('paymentType'),
|
|
|
coupon_code: orderInfo('couponCode'),
|
|
|
use_yoho_coin: yohoCoin,
|
...
|
...
|
@@ -194,7 +194,7 @@ function orderCompute() { |
|
|
$('.total').html(total);
|
|
|
}
|
|
|
|
|
|
updateDeliverId(deliverId);
|
|
|
updateDeliverWay(deliver_way);
|
|
|
}
|
|
|
}).fail(function() {
|
|
|
window.location.reload();
|
...
|
...
|
@@ -223,7 +223,7 @@ function submitOrder() { |
|
|
method: 'POST',
|
|
|
url: '/cart/index/new/orderSub',
|
|
|
data: {
|
|
|
addressId: orderInfo('addressId'),
|
|
|
delivery_way: orderInfo('delivery_way'),
|
|
|
cartType: orderInfo('cartType') || 'ordinary',
|
|
|
deliveryId: orderInfo('deliveryId'),
|
|
|
deliveryTimeId: orderInfo('deliveryTimeId'),
|
...
|
...
|
|