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