init: 从宝塔同步到 Gitea
This commit is contained in:
@@ -0,0 +1,176 @@
|
||||
{include file="public/header"}
|
||||
<style>
|
||||
.x-body .layui-row{ margin-top:-10px; line-height:25px; background:#f5f5f5; border-radius:10px; }
|
||||
.x-body .layui-row .xblock button{ margin-top:-20px; }
|
||||
.x-body .layui-form{ margin-top:15px; margin-bottom:10px; }
|
||||
.x-body .layui-form .layui-input-block{ display:inline-block; width:150px; margin-left:0; }
|
||||
.x-body .layui-form .layui-form-item{ display:inline-block; margin-left:0; }
|
||||
.x-body .layui-form .layui-form-item .layui-form-label{ width:48px; }
|
||||
.x-body .layui-form .layui-form-item .layui-input-block{ margin-left:-10px; width:100px; }
|
||||
.x-body .layui-form .layui-form-item .layui-input-block .layui-form-radio i{ margin-right:4px; }
|
||||
.x-body .layui-form .layui-form-item .layui-form-radio{ margin-top:6px; margin-right:-8px; }
|
||||
.layui-input-block dl{ text-align:left; }
|
||||
.x-so{ margin:0; }
|
||||
.x-so input.layui-input{ width:150px; }
|
||||
.x-nav{overflow: inherit; } .x-nav .refresh{margin-right: 20px; }
|
||||
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
|
||||
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
|
||||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="x-nav" style="padding: 0px;">
|
||||
<span class="change_box">
|
||||
<a href="javascript:;" class="list-one actived" data-id="1">用户列表</a>
|
||||
<a href="javascript:;" class="list-two" data-id="2">用户添加</a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
|
||||
href="javascript:location.replace(location.href);" title="刷新">
|
||||
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="x-body">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
<th>appid</th>
|
||||
<th>名称</th>
|
||||
<th>备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach name="admin_list" item="vo"}
|
||||
<tr>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.appid}</td>
|
||||
<td>{$vo.name}</td>
|
||||
<td>{$vo.remake}</td>
|
||||
<td class="td-manage">
|
||||
<a href="/log/scan_admin_edit?id={$vo.id}">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#009688;">修改</span>
|
||||
</a>
|
||||
<a onclick="member_del(this,'{$vo.id}')" href="javascript:;">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#ff5050;">删除</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{$admin_list->render()}
|
||||
</div>
|
||||
<script>
|
||||
// 代理列表和添加代理切换
|
||||
$('.x-nav .change_box a').click(function(){
|
||||
// 样式切换
|
||||
$('.x-nav .change_box a').removeClass('actived');
|
||||
$(this).addClass('actived');
|
||||
// 页面切换
|
||||
var id = $(this).attr('data-id');
|
||||
if(id == "1") location.href = '/log/scan_admin';
|
||||
if(id == "2") location.href = '/log/scan_admin_add';
|
||||
});
|
||||
/*用户-删除*/
|
||||
function member_del(obj, id) {
|
||||
layer.confirm('确认要删除吗?',function () {
|
||||
// 数据验证
|
||||
if(id <= 0){
|
||||
layer.msg('删除用户出错!');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 拼装数据
|
||||
var query = new Object;
|
||||
query.scan_admin_id = id;
|
||||
|
||||
// 发送数据到后台删除会员
|
||||
var result = ajax('/log/scan_admin_del',query);
|
||||
if(result.code == 1){
|
||||
layer.msg(result.msg, {icon: 1, time: 1000},function(){
|
||||
location.reload();
|
||||
});
|
||||
}else if(result.code == 0){
|
||||
layer.msg(result.msg, {icon: 2, time: 1000});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装 AJAX 函数
|
||||
* @param url 目标地址
|
||||
* @param query 参数
|
||||
* @returns {string}
|
||||
*/
|
||||
function ajax(url, query) {
|
||||
var returnData = "";
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: query,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
returnData = data;
|
||||
}
|
||||
});
|
||||
return returnData;
|
||||
}
|
||||
$('#print').click(function(){
|
||||
var qs = getQueryString();
|
||||
var startDate = qs["startDate"];
|
||||
var endDate = qs["endDate"];
|
||||
var status = qs["status"];
|
||||
var username = qs["username"];
|
||||
if(startDate == undefined){
|
||||
startDate = '';
|
||||
}
|
||||
if(endDate == undefined){
|
||||
endDate = '';
|
||||
}
|
||||
if(status == undefined){
|
||||
status = '';
|
||||
}
|
||||
if(username == undefined){
|
||||
username = '';
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title:'用户列表打印',
|
||||
content: '/log/admin_print?startDate='+startDate+'&endDate='+endDate+'&status='+status+'&username='+username,
|
||||
area: ['95%', '95%']
|
||||
});
|
||||
});
|
||||
function getQueryString() {
|
||||
var qs = location.search.substr(1), // 获取url中"?"符后的字串
|
||||
args = {}, // 保存参数数据的对象
|
||||
items = qs.length ? qs.split("&") : [], // 取得每一个参数项,
|
||||
item = null,
|
||||
len = items.length;
|
||||
|
||||
for(var i = 0; i < len; i++) {
|
||||
item = items[i].split("=");
|
||||
var name = decodeURIComponent(item[0]),
|
||||
value = decodeURIComponent(item[1]);
|
||||
if(name) {
|
||||
args[name] = value;
|
||||
}
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
$('#export').click(function(){
|
||||
var startDate = $('#start').val();
|
||||
var endDate = $('#end').val();
|
||||
var status = $('#status').val();
|
||||
var username = $('#username').val();
|
||||
layer.confirm('确定导出 excel 吗?',function(index){
|
||||
location.href = "/log/index?export=1&&startDate="+startDate+"&&endDate="+endDate+"&&status="+status+"&&username="+username;
|
||||
layer.close(index);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user