From 58758fe8a1a59f0af9e04c8a5f1cf1a7139deb0d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 26 一月 2021 17:12:15 +0800
Subject: [PATCH] #
---
src/main/webapp/views/tag/tag.html | 33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/main/webapp/views/tag/tag.html b/src/main/webapp/views/tag/tag.html
index 8b5eaa3..0106080 100644
--- a/src/main/webapp/views/tag/tag.html
+++ b/src/main/webapp/views/tag/tag.html
@@ -190,7 +190,7 @@
return;
}
var ids = checkRows.map(function (d) {
- return d.authorityId;
+ return d.id;
});
doDel({ids: ids});
}
@@ -274,15 +274,30 @@
}, function (i) {
layer.close(i);
var loadIndex = layer.load(2);
- $.get('../../json/ok.json', {id: obj.data ? obj.data.authorityId : obj.ids}, function (res) {
- layer.close(loadIndex);
- if (res.code === 200) {
- layer.msg(res.msg, {icon: 1});
- insTb.refresh();
- } else {
- layer.msg(res.msg, {icon: 2});
+ var ids;
+ if (obj.data) {
+ ids = [];
+ ids[0] = obj.data.id;
+ } else {
+ ids = obj.ids;
+ }
+ $.ajax({
+ url: baseUrl+"/tag/delete/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {ids: ids},
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.msg(res.msg, {icon: 1});
+ insTb.refresh();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
}
- }, 'json');
+ })
});
}
--
Gitblit v1.9.1