init: 从宝塔同步到 Gitea
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
{include file="public/header"}
|
||||
<style type="text/css">
|
||||
textarea, input[type="text"], input[type="password"],.uneditable-input{border: 1px solid #ccc;background-color: #fff; }
|
||||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||||
.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; }
|
||||
.x-nav{overflow: inherit; } .x-nav .refresh{margin-right: 20px; }
|
||||
.control-group{overflow: hidden; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dotted #dddddd; }
|
||||
.control-label{float: left; padding-top: 3px; width: 160px; text-align: right; font-size: 14px; }
|
||||
.controls{text-align: left; overflow-x: auto; overflow-y: hidden; margin-left: 180px; }
|
||||
.controls input{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls select{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls textarea{width: 400px; height: 90px; border-radius: 4px; } .form-horizontal{margin: 0 10px; }
|
||||
.bottom-buttom{border-top: 1px solid #e5e5e5; margin-top: 20px; background-color: #f5f5f5; padding: 30px 0; }
|
||||
.submit{width: 50px; text-align: center; background-color:#3daae9; color: #fff; padding: 5px 10px; font-size: 16px; border-radius: 4px; cursor:pointer; }
|
||||
</style>
|
||||
<body>
|
||||
<div class="x-nav" style="padding: 0px;">
|
||||
<span class="change_box">
|
||||
<a href="javascript:;" class="list-one" data-id="1">用户列表</a>
|
||||
<a href="javascript:;" class="list-two actived" 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="info_from form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label">appid:</label>
|
||||
<div class="controls">
|
||||
<input id="L_username" name="L_username" type="text" value="{$admin.appid}" readonly maxlength="50" minlength="3" class="required">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">秘钥:</label>
|
||||
<div class="controls">
|
||||
<input id="L_pass" name="L_pass" type="text" value="{$admin.appsecret}" maxlength="50" minlength="3" class="required">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">确认密码:</label>
|
||||
<div class="controls">
|
||||
<input id="L_repass" name="L_repass" type="text" value="{$admin.appsecret}" maxlength="50" minlength="3" class="required"><span class="help-inline">
|
||||
<font color="red"> * 与秘钥保持一致</font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">名称:</label>
|
||||
<div class="controls">
|
||||
<input id="L_name" name="L_name" type="text" value="{$admin.name}" maxlength="50" minlength="3" class="required"><span class="help-inline">
|
||||
<font color="red"> *</font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-buttom">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<div class='submit'>保存</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 隐藏参数 -->
|
||||
<input type="hidden" id="id" value="{$admin.id}">
|
||||
<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/api_admin';
|
||||
if(id == "2") location.href = '/log/api_admin_edit';
|
||||
});
|
||||
|
||||
//监听提交
|
||||
$('.submit').click(function () {
|
||||
// 获取和拼装添加代理的数据
|
||||
var query = new Object();
|
||||
query.id = $('#id').val();
|
||||
query.appid = $('#L_username').val();
|
||||
query.pass = $('#L_pass').val();
|
||||
query.repass = $('#L_repass').val();
|
||||
query.name = $('#L_name').val();
|
||||
|
||||
// 验证数据
|
||||
if(query.pass.length > 0){
|
||||
if(query.pass.length >= 6){
|
||||
if(query.pass != query.repass){
|
||||
layer.msg("两次密码不一致!");
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
layer.msg("密码不能少于6位字符!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 发送数据到后台添加会员
|
||||
var result = ajax('/log/do_api_admin_edit',query);
|
||||
if(result.code == 1){
|
||||
layer.alert(result.msg, {icon: 6}, function () {
|
||||
location.href = '/log/api_admin';
|
||||
});
|
||||
}else{
|
||||
layer.msg(result.msg,{icon:2});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// AJAX函数封装
|
||||
function ajax(url,query){
|
||||
var returnData = 0;
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:query,
|
||||
type:'POST',
|
||||
dataType:'JSON',
|
||||
async:false,
|
||||
success:function(data){
|
||||
returnData = data;
|
||||
}
|
||||
});
|
||||
return returnData;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user