124 lines
4.8 KiB
HTML
124 lines
4.8 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>{$lang['system_name']}</title>
|
||
<meta name="renderer" content="webkit">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||
<link rel="stylesheet" href="/static/agent/css/font.css">
|
||
<link rel="stylesheet" href="/static/agent/css/xadmin.css">
|
||
<script type="text/javascript" src="/static/agent/js/jquery.min.js"></script>
|
||
<script type="text/javascript" src="/static/agent/lib/layui/layui.js" charset="utf-8"></script>
|
||
<script type="text/javascript" src="/static/agent/js/xadmin.js"></script>
|
||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||
<!--[if lt IE 9]>
|
||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||
<![endif]-->
|
||
<style type="text/css">
|
||
.layui-form-radio{margin-right:-20px;margin-left:10px;}
|
||
.layui-form-label {
|
||
width: 140px;
|
||
}
|
||
</style>
|
||
</head>
|
||
|
||
<body>
|
||
<div class="x-body">
|
||
<form class="layui-form">
|
||
<div class="layui-form-item">
|
||
<label for="nickname" class="layui-form-label">{$lang['nickname']}</label>
|
||
<div class="layui-input-inline">
|
||
<input type="text" id="nickname" autocomplete="off" class="layui-input" value="{$user.nickname}">
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">{$lang['mobile']}</label>
|
||
<div class="layui-input-inline">
|
||
<input type="text" id="mobile" autocomplete="off" class="layui-input" value="{$user.mobile}">
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">Telegram</label>
|
||
<div class="layui-input-inline">
|
||
<input type="text" id="telegram" autocomplete="off" class="layui-input" value="{$user.telegram}">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label for="remark" class="layui-form-label">{$lang['remark']}</label>
|
||
<div class="layui-input-inline">
|
||
<textarea type="text" id="remark" autocomplete="off" class="layui-textarea">{$user.remark}</textarea>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<span style="display:block;margin:10px auto;height: 38px;line-height: 38px;padding: 0 18px;background-color: #AA947D;width:100px;color: #fff;white-space: nowrap;text-align: center;font-size: 14px;border: none;border-radius: 2px;cursor: pointer;" id="submit" >{$lang['submit_now']}</span>
|
||
</div>
|
||
</form>
|
||
|
||
<!-- 隐藏参数 -->
|
||
<input type="hidden" id="user_id" value="{$user.id}">
|
||
</div>
|
||
<script>
|
||
$(function () {
|
||
var lang = {$jsonlang};
|
||
// 提交编辑代理
|
||
$('#submit').click(function () {
|
||
// 获取数据
|
||
var query = new Object();
|
||
query.user_id = $('#user_id').val();
|
||
query.nickname = $('#nickname').val();
|
||
query.mobile = $('#mobile').val();
|
||
query.telegram = $('#telegram').val();
|
||
query.remark = $('#remark').val();
|
||
|
||
// 验证数据
|
||
if (query.nickname.length == 0 || query.nickname == undefined) {
|
||
layer.alert(lang.empty_nickname,{
|
||
title:lang.message,
|
||
});
|
||
return false;
|
||
}
|
||
if (query.mobile.length == 0 || query.mobile == undefined) {
|
||
layer.alert(lang.empty_mobile,{
|
||
title:lang.message,
|
||
});
|
||
return false;
|
||
}
|
||
if (query.telegram.length == 0 || query.telegram == undefined) {
|
||
layer.alert(lang.empty_telegram,{
|
||
title:lang.message,
|
||
});
|
||
return false;
|
||
}
|
||
|
||
|
||
|
||
// 发送数据给后台创建代理
|
||
$.ajax({
|
||
url: '/manager/do_edit',
|
||
data: query,
|
||
type: 'POST',
|
||
dataType: 'JSON',
|
||
success: function (data) {
|
||
if (data.code == 0) {
|
||
layer.msg(data.msg);
|
||
} else if (data.code == 1) {
|
||
layer.alert(data.msg,{
|
||
title:lang.message,
|
||
}, function () {
|
||
x_admin_close();
|
||
parent.location.reload();
|
||
});
|
||
}
|
||
}
|
||
})
|
||
});
|
||
})
|
||
</script>
|
||
</body>
|
||
|
||
</html> |