pycharm下格式化模板文件,统一风格
This commit is contained in:
@@ -1,30 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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') }}" />
|
||||
<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;">
|
||||
<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') }}" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<input placeholder="验证码 : " name="captcha" hover class="code layui-input layui-input-inline"/>
|
||||
<img src="{{ url_for('adminIndex.get_captcha') }}" class="codeImage" id="captchaImage"/>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
@@ -38,7 +39,7 @@
|
||||
</form>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
<script>
|
||||
layui.use(['form','jquery','layer','button','popup'], function() {
|
||||
layui.use(['form', 'jquery', 'layer', 'button', 'popup'], function () {
|
||||
let form = layui.form;
|
||||
let $ = layui.jquery;
|
||||
let layer = layui.layer;
|
||||
@@ -46,23 +47,23 @@
|
||||
let popup = layui.popup;
|
||||
let captchaPath = "{{ url_for('adminIndex.get_captcha') }}";
|
||||
|
||||
form.on('submit(login)', function(data){
|
||||
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){
|
||||
data: data.field,
|
||||
type: "post",
|
||||
dataType: 'json',
|
||||
success: function (result) {
|
||||
layer.close(loader);
|
||||
btn.stop(function(){
|
||||
if(result.success){
|
||||
popup.success(result.msg,function(){
|
||||
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();
|
||||
} else {
|
||||
popup.failure(result.msg, function () {
|
||||
document.getElementById("captchaImage").src = captchaPath + "?" + Math.random();
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -71,16 +72,18 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#captchaImage").click(function(){
|
||||
document.getElementById("captchaImage").src= captchaPath + "?" + Math.random();
|
||||
})
|
||||
setInterval(function(){
|
||||
document.getElementById("captchaImage").src= captchaPath + "?" + Math.random();
|
||||
},30 * 1000);
|
||||
$("#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; }
|
||||
if (window != top) {
|
||||
top.location.href = location.href;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user