...
|
...
|
@@ -9,6 +9,7 @@ var $ = require('jquery'), |
|
|
Hammer = require('yoho.hammer'),
|
|
|
Handlebars = require('yoho.handlebars'),
|
|
|
tip = require('../plugin/tip'),
|
|
|
loading = require('../plugin/loading'),
|
|
|
orderInfo = require('./order-info').orderInfo;
|
|
|
|
|
|
var dispatchModeHammer,
|
...
|
...
|
@@ -94,6 +95,7 @@ function orderCompute() { |
|
|
}
|
|
|
|
|
|
function submitOrder() {
|
|
|
loading.showLoadingMask();
|
|
|
$.ajax({
|
|
|
method: 'POST',
|
|
|
url: '/shoppingCart/orderSub',
|
...
|
...
|
@@ -114,6 +116,7 @@ function submitOrder() { |
|
|
var url;
|
|
|
|
|
|
if (!res) {
|
|
|
loading.hideLoadingMask();
|
|
|
tip.show('网络出错');
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -125,11 +128,14 @@ function submitOrder() { |
|
|
} else {
|
|
|
url = '/home/pay?order_code=' + res.data.order_code;
|
|
|
}
|
|
|
window.setCookie('order-info', '');
|
|
|
window.location.href = url;
|
|
|
} else {
|
|
|
loading.hideLoadingMask();
|
|
|
tip.show(res.messege || '网络出错');
|
|
|
}
|
|
|
}).fail(function() {
|
|
|
loading.hideLoadingMask();
|
|
|
tip.show('网络出错');
|
|
|
});
|
|
|
}
|
...
|
...
|
|