admin-modify
This commit is contained in:
@@ -38,17 +38,17 @@
|
|||||||
<div class="sidebar-heading lang" key="MANAGE">
|
<div class="sidebar-heading lang" key="MANAGE">
|
||||||
</div>
|
</div>
|
||||||
<li class="nav-item active" id="view1">
|
<li class="nav-item active" id="view1">
|
||||||
<a class="nav-link" onclick="view(1)" style="cursor: pointer;" id="manage_prj">
|
<a class="nav-link" href="/admin?page=basic" style="cursor: pointer;" id="manage_prj">
|
||||||
<i class="fa fa-fw fa-tachometer"></i>
|
<i class="fa fa-fw fa-tachometer"></i>
|
||||||
<span class="lang" key="BASICADMIN"></span></a>
|
<span class="lang" key="BASICADMIN"></span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" id="view2">
|
<li class="nav-item" id="view2">
|
||||||
<a class="nav-link" onclick="view(2)" style="cursor: pointer;" id="manage_data">
|
<a class="nav-link" href="/admin?page=user" style="cursor: pointer;" id="manage_data">
|
||||||
<i class="fa fa-fw fa-database"></i>
|
<i class="fa fa-fw fa-database"></i>
|
||||||
<span class="lang" key="DATAADMIN"></span></a>
|
<span class="lang" key="DATAADMIN"></span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" id="view3">
|
<li class="nav-item" id="view3">
|
||||||
<a class="nav-link" onclick="view(3)" style="cursor: pointer;" id="manage_strg">
|
<a class="nav-link" href="/admin?page=batch" style="cursor: pointer;" id="manage_strg">
|
||||||
<i class="fa fa-fw fa-user"></i>
|
<i class="fa fa-fw fa-user"></i>
|
||||||
<span class="lang" key="USERADMIN"></span></a>
|
<span class="lang" key="USERADMIN"></span></a>
|
||||||
</li>
|
</li>
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="detail3" hidden>
|
<div id="detail3" hidden>
|
||||||
<div class="col-xl-4 col-md-6 mb-4">
|
<div class="col-xl-8 col-md-6 mb-4">
|
||||||
<div class="card shadow" style="margin-top:1.5rem;border-radius:10px">
|
<div class="card shadow" style="margin-top:1.5rem;border-radius:10px">
|
||||||
<div class="card-body" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
|
<div class="card-body" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
|
||||||
<p>格式(每个账号一行): 账号,密码,密保问题,问题答案</p>
|
<p>格式(每个账号一行): 账号,密码,密保问题,问题答案</p>
|
||||||
@@ -234,8 +234,8 @@
|
|||||||
background-color: #e8f4fc;
|
background-color: #e8f4fc;
|
||||||
}
|
}
|
||||||
td, th {
|
td, th {
|
||||||
padding: 12px 15px;
|
padding: 0.5rem !important;
|
||||||
vertical-align: middle;
|
vertical-align: middle !important;
|
||||||
}
|
}
|
||||||
.action-buttons {
|
.action-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
{
|
{
|
||||||
showtext("操作成功!")
|
showtext("操作成功!")
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
window.location.href = window.location.href
|
window.location.href = window.location.href.split("?")[0] + "?page=user"
|
||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
modald.close()
|
modald.close()
|
||||||
showtext("操作成功!")
|
showtext("操作成功!")
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
window.location.href = window.location.href
|
window.location.href = window.location.href.split("?")[0] + "?page=user"
|
||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
modald.close()
|
modald.close()
|
||||||
showtext("操作成功!")
|
showtext("操作成功!")
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
window.location.href = window.location.href
|
window.location.href = window.location.href.split("?")[0] + "?page=user"
|
||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -590,6 +590,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 尝试获取page参数
|
||||||
|
if(window.location.href.split("?").length > 1){
|
||||||
|
var page = window.location.href.split("?")[1].split("=")[1]
|
||||||
|
if (page == "user")
|
||||||
|
view(2)
|
||||||
|
else if(page == "basic")
|
||||||
|
view(1)
|
||||||
|
else if(page == "batch")
|
||||||
|
view(3)
|
||||||
|
}
|
||||||
var addAcc = function(){
|
var addAcc = function(){
|
||||||
var modald = showmodaltext("<div style='text-align:center'><i class='fa fa-spin fa-cog' style='font-size:2rem;color:#4e73df'></i><p style='margin-top:6px;margin-bottom:0;color:#4e73df;font-size:1rem;font-weight:bold'>"+JSLang[lang].loading2+"</p></div>")
|
var modald = showmodaltext("<div style='text-align:center'><i class='fa fa-spin fa-cog' style='font-size:2rem;color:#4e73df'></i><p style='margin-top:6px;margin-bottom:0;color:#4e73df;font-size:1rem;font-weight:bold'>"+JSLang[lang].loading2+"</p></div>")
|
||||||
var acc = $("#acc").val()
|
var acc = $("#acc").val()
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
$(function(){
|
var initTable = function(){
|
||||||
$.getJSON("queryData",function(res){
|
$.getJSON("queryData",function(res){
|
||||||
for(var i = 0;i<=res.length-1;i = i+1)
|
for(var i = 0;i<=res.length-1;i = i+1)
|
||||||
{
|
{
|
||||||
$("#tbody").append("<tr><td>"+res[i]["username"]+"</td><td>"+res[i]["projects"]+"</td><td>"+res[i]["messages"]+"</td><td>"+ "<a class='btn btn-primary' style='cursor:pointer;' onclick=\"clearMessage('"+res[i]["username"]+"')\" >清空消息</a> "+ "<a class='btn btn-success' style='cursor:pointer;' onclick=\"resetPassword('"+res[i]["username"]+"')\" >重置密码</a> "+"<a class='btn btn-danger' style='cursor:pointer;' onclick=\"removeUser('"+res[i]["username"]+"')\" >删除用户</a>"+"</td></tr>")
|
$("#tbody").append("<tr><td>"+res[i]["username"]+"</td><td>"+res[i]["projects"]+"</td><td>"+res[i]["messages"]+"</td><td>"+ "<a class='btn btn-sm btn-primary' style='cursor:pointer;' onclick=\"clearMessage('"+res[i]["username"]+"')\" >清空消息</a> "+ "<a class='btn btn-sm btn-success' style='cursor:pointer;' onclick=\"resetPassword('"+res[i]["username"]+"')\" >重置密码</a> "+"<a class='btn btn-sm btn-danger' style='cursor:pointer;' onclick=\"removeUser('"+res[i]["username"]+"')\" >删除用户</a>"+"</td></tr>")
|
||||||
}
|
}
|
||||||
datatable = $("#table").DataTable({
|
datatable = $("#table").DataTable({
|
||||||
"order": [[ 2, "desc" ]],
|
"order": [[ 2, "desc" ]],
|
||||||
@@ -33,4 +33,7 @@ $(function(){
|
|||||||
});
|
});
|
||||||
$("#table").attr("class","table table-striped table-bordered dataTable no-footer")
|
$("#table").attr("class","table table-striped table-bordered dataTable no-footer")
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
$(function(){
|
||||||
|
initTable()
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user