调整目录结构
This commit is contained in:
@@ -1,86 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>登录</title>
|
||||
<!-- 样 式 文 件 -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='/admin/component/pear/css/pear.css') }}" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='/admin/admin/css/other/login.css') }}" />
|
||||
</head>
|
||||
<!-- 代 码 结 构 -->
|
||||
<body background="{{ url_for('static', filename='/admin/admin/images/background.svg') }}" style="background-size: cover;">
|
||||
<form class="layui-form" action="javascript:void(0);">
|
||||
<div class="layui-form-item">
|
||||
<img class="logo" src="{{ url_for('static', filename='/admin/admin/images/logo.png') }}" />
|
||||
<div class="title">Pear Admin</div>
|
||||
<div class="desc">
|
||||
明 湖 区 最 具 影 响 力 的 设 计 规 范 之 一
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input name="username" type="text" placeholder="账 户 : admin " value="admin" hover class="layui-input" />
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input name="password" type="password" placeholder="密 码 : 123456 " value="123456" hover class="layui-input" />
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input placeholder="验证码 : " name="captcha" hover class="code layui-input layui-input-inline" />
|
||||
<img src="{{ url_for('adminIndex.getCaptcha') }}" class="codeImage" id="captchaImage"/>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input type="checkbox" name="remember-me" title="记住密码" lay-skin="primary">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button class="pear-btn pear-btn-success login" lay-submit lay-filter="login">
|
||||
登 入
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
<script>
|
||||
layui.use(['form','jquery','layer','button','popup'], function() {
|
||||
let form = layui.form;
|
||||
let $ = layui.jquery;
|
||||
let layer = layui.layer;
|
||||
let button = layui.button;
|
||||
let popup = layui.popup;
|
||||
let captchaPath = "{{ url_for('adminIndex.getCaptcha') }}";
|
||||
|
||||
form.on('submit(login)', function(data){
|
||||
let loader = layer.load();
|
||||
let btn = button.load({elem: '.login'});
|
||||
$.ajax({
|
||||
data:data.field,
|
||||
type:"post",
|
||||
dataType:'json',
|
||||
success:function(result){
|
||||
layer.close(loader);
|
||||
btn.stop(function(){
|
||||
if(result.success){
|
||||
popup.success(result.msg,function(){
|
||||
location.href = "{{ url_for('adminIndex.index') }}";
|
||||
})
|
||||
}else{
|
||||
popup.failure(result.msg,function(){
|
||||
document.getElementById("captchaImage").src=captchaPath + "?" + Math.random();
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#captchaImage").click(function(){
|
||||
document.getElementById("captchaImage").src= captchaPath + "?" + Math.random();
|
||||
})
|
||||
setInterval(function(){
|
||||
document.getElementById("captchaImage").src= captchaPath + "?" + Math.random();
|
||||
},30 * 1000);
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
if(window!=top){ top.location.href = location.href; }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user