...
|
...
|
@@ -124,12 +124,12 @@ $('.me-orders, .order-detail').on('click', '.cancel-order', function (e) { |
|
|
});
|
|
|
function deleteOrder(id, obj) {
|
|
|
// 是否为彻底删除
|
|
|
var isFullyDelete = $(obj).data("deleted") || false;
|
|
|
var $order = $(obj).parents("order");
|
|
|
var isFullyDelete = true;
|
|
|
var $order = $(obj).parents(".order");
|
|
|
var deleteMessage = isFullyDelete ? "您确定要永久删除订单吗?" : "您确定要删除订单吗?";
|
|
|
var deleteTip = isFullyDelete ? "永久删除后,订单将无法恢复,您将无法对该订单的商品申请售后服务,请谨慎操作。" : "删除后,您可以在订单回收站找回该订单,也可以做永久删除。";
|
|
|
var insert = Handlebars.compile(deleteDialog);
|
|
|
var html = insert({deleteMessage: deleteMessage, deleteTip: deleteTip})
|
|
|
var html = insert({deleteMessage: deleteMessage, deleteTip: deleteTip});
|
|
|
var options = {
|
|
|
mask: false,
|
|
|
btns: [
|
...
|
...
|
@@ -140,7 +140,7 @@ function deleteOrder(id, obj) { |
|
|
cb: function () {
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/home/orders/deleteOrder',
|
|
|
url: '/home/orders/delOrder',
|
|
|
data: {
|
|
|
orderCode: id,
|
|
|
isFullyDelete: isFullyDelete,
|
...
|
...
|
@@ -148,6 +148,7 @@ function deleteOrder(id, obj) { |
|
|
}).then(function (data) {
|
|
|
if (data.code === 200) {
|
|
|
active.close();
|
|
|
$order.remove();
|
|
|
$order.addClass("deleted-easeout");//执行动画后移除元素
|
|
|
setTimeout(function(){
|
|
|
$order.remove();
|
...
|
...
|
|