Authored by cailing

再次购买调试

... ... @@ -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;
... ...