...
|
...
|
@@ -180,8 +180,24 @@ $('.me-orders, .order-detail').on('click', '.cancel-order', function(e) { |
|
|
active = editOrder($(this).closest('.order, .order-detail').data('id'))
|
|
|
active.show();
|
|
|
newAddress(0);
|
|
|
}).on('click', '.rebuy', function() {
|
|
|
var id = $(this).closest('.order, .order-detail').data('id');
|
|
|
buyAgain(id);
|
|
|
});
|
|
|
|
|
|
//再次购买
|
|
|
function buyAgain(id){
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
url: '/home/orders/reAdd',
|
|
|
data: {orderCode: id}
|
|
|
}).then(function(d) {
|
|
|
if (d.code === 200) {
|
|
|
location.href = '';
|
|
|
} else {
|
|
|
new dialog.Alert(d.message).show();
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
// 地址操作
|
|
|
function newAddress(id) {
|
|
|
var code, codeId;
|
...
|
...
|
@@ -403,7 +419,7 @@ function saveAddress(id) { |
|
|
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
url: '/home/orders/modifyAddress',
|
|
|
url: '/home/orders/modifyAddress',
|
|
|
data: postData
|
|
|
}).then(function(d) {
|
|
|
if (d.code === 200) {
|
...
|
...
|
|