From 078aaa0188b20fc2850c921c2b9ba54e4a9ba774 Mon Sep 17 00:00:00 2001
From: falcon <9504402@qq.com>
Date: Wed, 20 May 2020 15:07:05 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=86=99=E5=88=A0=E9=99=A4=E8=A1=A8?=
=?UTF-8?q?=E6=A0=BC=E8=A1=8C=E7=9A=84=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FAuth/Views/App/Index.cshtml | 16 ++++------------
FAuth/Views/User/Index.cshtml | 14 ++++----------
2 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/FAuth/Views/App/Index.cshtml b/FAuth/Views/App/Index.cshtml
index e5eccfe..7e8fe6e 100644
--- a/FAuth/Views/App/Index.cshtml
+++ b/FAuth/Views/App/Index.cshtml
@@ -15,11 +15,11 @@
-
+
{{r.Id}} |
{{r.Name}} |
{{r.Description}} |
- |
+ |
@@ -51,18 +51,10 @@
});
}
},
- remove(id) {
+ remove(id, i) {
var url = myJs.url.app.RemoveApp;
myJs.post(url, { id: id }, function (d) {
- var nArr = [];
- $.each(mydata.app_index.rows, function () {
- if (this.Id != id) {
- nArr.push(this);
- }
- });
- mydata.app_index.rows = nArr;
- }, function (s, i, m) {
- myJs.msg(m);
+ mydata.app_index.rows.splice(i, 1);
});
},
},
diff --git a/FAuth/Views/User/Index.cshtml b/FAuth/Views/User/Index.cshtml
index 1de76f0..882e775 100644
--- a/FAuth/Views/User/Index.cshtml
+++ b/FAuth/Views/User/Index.cshtml
@@ -18,12 +18,12 @@
-
+
{{u.Id}} |
{{u.UserName}} |
{{u.Name}} |
{{u.Status}} |
- |
+ |
@@ -65,15 +65,9 @@
userIndex.tableShow = true;
});
},
- removeUser(id) {
+ removeUser(id, index) {
myJs.post(myJs.url.user.RemoveUser, { adminTicket: this.ticket, id: id }, function (d) {
- var nArr = [];
- $.each(userIndex.users, function () {
- if (this.Id != id) {
- nArr.push(this);
- }
- });
- userIndex.users = nArr;
+ userIndex.users.splice(index, 1);
});
},
}