Authored by liangxs

重新购买js

... ... @@ -85,5 +85,20 @@ optHammer.on('tap', function(e) {
tip.show('网络错误');
});
});
} else if ($cur.hasClass('btn-rebuy')) {
$.ajax({
type: 'GET',
url: '/home/readd',
data: {
orderCode: orderId
},
success: function(res) {
tip.show(res.message);
location.href = '/cart/index/index';
},
error: function(res) {
tip.show(res.message);
}
});
}
});
... ...
... ... @@ -186,6 +186,21 @@ orderHammer.on('tap', function(e) {
//Location to order detail
url = $order.data('href');
location.href = url;
} else if ($cur.closest('.rebuy').length > 0) {
$.ajax({
type: 'GET',
url: '/home/readd',
data: {
orderCode: id
},
success: function(res) {
tip.show(res.message);
location.href = '/cart/index/index';
},
error: function(res) {
tip.show(res.message);
}
});
}
});
... ...