mirror of
https://github.com/capricornxl/ad-password-self-service.git
synced 2025-08-12 01:44:58 +08:00
remove dependence redis-sever, now use mem storage
update to layui, support PC and Mobile html render
This commit is contained in:
57
templates/base.html
Normal file
57
templates/base.html
Normal file
@@ -0,0 +1,57 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta http-equiv="Pragma" content= "no-cache" />
|
||||
<meta http-equiv="Cache-Control" content= "no-cache" />
|
||||
<meta http-equiv="Expires" content= "0" />
|
||||
<title>{{ global_title }}</title>
|
||||
<link rel="stylesheet" href="{% static 'layui/css/layui.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
||||
{% block headercss %}{% endblock %}
|
||||
{% block headerjs %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="{% static 'js/html5.min.js' %}"></script>
|
||||
<script src="{% static 'js/respond.min.js' %}"></script>
|
||||
<![endif]-->
|
||||
<div class="layui-container">
|
||||
<div class="layui-row">
|
||||
<div class="layui-hide-xs layui-col-md1">
|
||||
<div class="grid"></div>
|
||||
</div>
|
||||
<div class="layui-col-xs12 layui-col-md10">
|
||||
<div class="grid">
|
||||
<div class="middle-header">
|
||||
<h1>{{ global_title }}</h1>
|
||||
</div>
|
||||
<div class="layui-panel">
|
||||
<div class="layui-row">
|
||||
{% block upmiddleheader %}{% endblock %}
|
||||
</div>
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
|
||||
<legend>
|
||||
{% block paneltitle %}{% endblock %}
|
||||
</legend>
|
||||
</fieldset>
|
||||
{% block middleblock %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid">
|
||||
{% block middleblockfoot %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-hide-xs layui-col-md1">
|
||||
<div class="grid"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{% static 'layui/layui.js' %}" charset="utf-8"></script>
|
||||
{% block footercss %}{% endblock %}
|
||||
{% block footerjs %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
@@ -1,90 +0,0 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>自助密码平台</title>
|
||||
<link rel="stylesheet" href="{% static 'css/dmaku.css' %}">
|
||||
<script type="text/javascript" src="{% static 'js/jquery-1.8.3.min.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'js/check.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'js/dingtalk.open.js' %}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="head-container" id="head-container">
|
||||
<p>
|
||||
密码自助服务平台
|
||||
</p>
|
||||
</div>
|
||||
<div class="middle-container" id="middle-container">
|
||||
<div class="form-container right-content-container">
|
||||
<form action="">
|
||||
</form>
|
||||
</div>
|
||||
<div class="form-container left-content-container">
|
||||
<form action="/" method="post" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<h1>修改密码</h1>
|
||||
<span>新密码8至30位长度,要求包含大小写字母及数字。</span>
|
||||
<input type="text" id="username" name="username" placeholder="账号,格式:abc\lisi、lisi、lisi@abc.com">
|
||||
<input type="password" id="old_password" name="old_password" placeholder="旧密码">
|
||||
<input type="password" id="new_password" name="new_password" placeholder="新密码">
|
||||
<input type="password" id="ensure_password" name="ensure_password" placeholder="再次确认新密码">
|
||||
<p></p>
|
||||
<button id="btn_modify" type="submit">提交</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="overlay-container">
|
||||
<div class="overlay">
|
||||
<div class="overlay-panel overlay-left">
|
||||
<h1>我要修改密码</h1>
|
||||
<p>记得自己的旧密码,需要自行修改</p>
|
||||
<p>⬇️⇓点它</p>
|
||||
<button class="ghost" id="modifyPwd">我要修改密码</button>
|
||||
</div>
|
||||
<div class="overlay-panel overlay-right">
|
||||
<h1>忘记密码或被锁</h1>
|
||||
<p>如果密码己遗忘,可通过使用⌊{{ scan_app }}⌉免密登录授权通过身份验证后方可重置</p>
|
||||
<p></p>
|
||||
<p>⬇️点它</p>
|
||||
<form action="/resetPassword" id="formDingLogin" name="formDingLogin" method="get">
|
||||
<input type="hidden" name="code" value="" id="code">
|
||||
<button class="ghost" id="dingLogin" type="submit">我要重置密码</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{% static 'js/dmaku.js' %}"></script>
|
||||
<script>
|
||||
BtnClick("#btn_modify", 'modify', {{ unsecpwd|safe }})
|
||||
let code;
|
||||
window.onload = function () {
|
||||
if (dd.env.platform !== 'notInDingTalk') {
|
||||
dd.ready(() => {
|
||||
dd.runtime.permission.requestAuthCode({corpId: '{{ corp_id }}'}).then((result) => {
|
||||
code = result.code;
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
}).finally(() => {
|
||||
document.getElementById("code").setAttribute("value", code)
|
||||
})
|
||||
});
|
||||
} else {
|
||||
$.alert('请在钉钉中访问本应用!')
|
||||
}
|
||||
}
|
||||
/** 回退事件 **/
|
||||
dd.ready(function () {
|
||||
document.addEventListener('backbutton', function (e) {
|
||||
e.preventDefault();
|
||||
dd.biz.navigation.close({
|
||||
onSuccess: function (result) {
|
||||
},
|
||||
onFail: function (err) {
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
107
templates/index.html
Normal file
107
templates/index.html
Normal file
@@ -0,0 +1,107 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% block headerjs %}<script type="text/javascript" src="{% static 'js/dingtalk.open.js' %}"></script>{% endblock %}
|
||||
{% block paneltitle %}修改密码{% endblock %}
|
||||
{% block middleblock %}
|
||||
<div class="layui-row">
|
||||
<form class="layui-form layui-form-pane" action="/" method="post" autocomplete="off">{% csrf_token %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="username" lay-verify="required" lay-verType="tips" autocomplete="off" placeholder="请输入账号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">旧密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" lay-verify="required|newpass" lay-verType="tips" name="old_password" id="old_password" placeholder="请输入旧密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">新密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" lay-verify="pass" lay-verType="tips" name="new_password" id="new_password" placeholder="请输入新密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">确认密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" lay-verify="pass|repass" lay-verType="tips" name="ensure_password" id="ensure_password" placeholder="再次确认新密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button type="submit" lay-submit="" class="layui-btn layui-btn-normal layui-btn-fluid">立即提交</button>
|
||||
</div>
|
||||
<div class="layui-form-item a-middle-text">
|
||||
<span class="layui-breadcrumb">
|
||||
<a class="layui-text" id="redirect_url" href=""><i class="layui-icon layui-icon-refresh-3"></i> 重置/解锁账号</a>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block middleblockfoot %}
|
||||
<blockquote class="layui-elem-quote layui-quote-nm">
|
||||
新密码8至30位长度,要求包含大小写字母及数字。<br><br>
|
||||
如果密码己遗忘,可点击上方<b>[<i class="layui-icon layui-icon-refresh-3"></i> 重置/解锁账号]</b>使用⌊{{ scan_app }}⌉应用内免登录授权并通过身份验证后进行重置/解锁账号。<br>
|
||||
* 如果有当弹出提示<b>是否同意授权</b>时,请务必<b>全部同意</b>,否则无法获取关键信息,导致无法正常使用重置/解锁账号!
|
||||
</blockquote>
|
||||
{% endblock %}
|
||||
{% block footercss %}{% endblock %}
|
||||
{% block footerjs %}
|
||||
<script src="{% static 'layui/layui.js' %}"></script>
|
||||
<script>
|
||||
layui.use(['form', 'jquery', 'layer'], function () {
|
||||
let form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
if ('{{ app_type }}' === 'DING') {
|
||||
let re_url= ""
|
||||
window.onload = function () {
|
||||
if (dd.env.platform !== 'notInDingTalk') {
|
||||
dd.ready(() => {
|
||||
dd.runtime.permission.requestAuthCode({corpId: '{{ corp_id }}'}).then((result) => {
|
||||
re_url = '/resetPassword?code=' + result.code
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
}).finally(() => {
|
||||
document.getElementById("redirect_url").setAttribute("href", re_url)
|
||||
})
|
||||
});
|
||||
} else {
|
||||
layer.open({
|
||||
title : '出错啦!'
|
||||
,content: '请在钉钉中打开本页面~~'
|
||||
,btn: '关闭'
|
||||
,btnAlign: 'c'
|
||||
,yes: function(){
|
||||
layer.closeAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if ('{{ app_type }}' === 'WEWORK') {
|
||||
let re_url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={{ app_id }}&agentid={{ agent_id }}&redirect_uri={{ redirect_url }}&response_type=code&scope=snsapi_privateinfo&state=#wechat_redirect"
|
||||
window.onload = function () {
|
||||
document.getElementById("redirect_url").setAttribute("href", re_url)
|
||||
}
|
||||
}
|
||||
form.verify({
|
||||
pass: [
|
||||
/^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}$/,
|
||||
'密码必须8到30位,要求包含大小写字母、数字与字符,且不能出现空格!'
|
||||
],
|
||||
repass: function (value,item) {
|
||||
if ($('#ensure_password').val() !== $('#new_password').val()) {
|
||||
return '两次输入密码不一致!';
|
||||
}
|
||||
},
|
||||
newpass: function (value,item) {
|
||||
if ($('#old_password').val() === $('#password').val()) {
|
||||
return '新旧密码不能重复使用,请修正!';
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
15
templates/messages.html
Normal file
15
templates/messages.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% block paneltitle %}结果{% endblock %}
|
||||
{% block middleblock %}
|
||||
<div class="layui-row">
|
||||
<form class="layui-form layui-form-pane" method="get" autocomplete="off">{% csrf_token %}
|
||||
<div class="layui-form-item">
|
||||
{{ msg }}
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-fluid" onclick="{{ button_click }}">{{ button_display }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
@@ -1,39 +0,0 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>自助密码平台</title>
|
||||
<link rel="stylesheet" href="{% static 'css/dmaku.css' %}">
|
||||
<script type="text/javascript" src="{% static 'js/jquery-1.8.3.min.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'js/check.js' %}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="head-container" id="head-container">
|
||||
<p>
|
||||
密码自助服务平台
|
||||
</p>
|
||||
</div>
|
||||
<div class="middle-container" id="middle-container">
|
||||
<div class="form-container right-content-container"></div>
|
||||
<div class="form-container left-content-container">
|
||||
<form action="messages" method="get" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<h1>结果</h1>
|
||||
<p style="font-size: 16px">{{ msg }}</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="overlay-container">
|
||||
<div class="overlay">
|
||||
<div class="overlay-panel overlay-left"></div>
|
||||
<div class="overlay-panel overlay-right">
|
||||
<button class="ghost" id="btn_back" type="button" onclick="{{ button_click }}">{{ button_display }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{% static 'js/dmaku.js' %}"></script>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@@ -1,68 +0,0 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>自助密码平台</title>
|
||||
<link rel="stylesheet" href="{% static 'css/dmaku.css' %}">
|
||||
<script type="text/javascript" src="{% static 'js/jquery-1.8.3.min.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'js/check.js' %}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="head-container" id="head-container">
|
||||
<p>
|
||||
密码自助服务平台
|
||||
</p>
|
||||
</div>
|
||||
<div class="middle-container" id="middle-container">
|
||||
<div class="form-container right-content-container">
|
||||
<form name="unlockAccount" method="post" action="unlockAccount" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<h1>重置</h1>
|
||||
<input type="text" id="username" name="username" readonly placeholder="{{ username }}" value="{{ username }}">
|
||||
<input type="hidden" id="code" name="code" readonly value="{{ code }}">
|
||||
<p></p>
|
||||
<p></p>
|
||||
<button id="btn_unlock" type="submit">解锁账号</button>
|
||||
<p>会话有效期5分钟</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="form-container left-content-container">
|
||||
<form name="resetPassword" method="post" action="" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<h1>重置</h1>
|
||||
<span>新密码8至30位长度,要求包含大小写字母及数字。</span>
|
||||
<input type="text" id="username" name="username" readonly placeholder="{{ username }}" value="{{ username }}">
|
||||
<input type="hidden" id="code" name="code" readonly value="{{ code }}">
|
||||
<input type="password" id="new_password" name="new_password" placeholder="新密码">
|
||||
<input type="password" id="ensure_password" name="ensure_password" placeholder="再次确认新密码">
|
||||
<p></p>
|
||||
<button id="btn_reset" type="submit">重置密码</button>
|
||||
<p>会话有效期5分钟,重密码会自动解锁账号</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="overlay-container">
|
||||
<div class="overlay">
|
||||
<div class="overlay-panel overlay-left">
|
||||
<h1>我要重置密码</h1>
|
||||
<p></p>
|
||||
<p>⬇️点它</p>
|
||||
<button class="ghost" id="modifyPwd">点我重置密码</button>
|
||||
<a class="ghost" href="/">返回主页</a>
|
||||
</div>
|
||||
<div class="overlay-panel overlay-right">
|
||||
<h1>我要解锁账号</h1>
|
||||
<p></p>
|
||||
<p>⬇️点它</p>
|
||||
<button class="ghost" id="scanCode">点我解锁账号</button>
|
||||
<a class="ghost" href="/">返回主页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{% static 'js/dmaku.js' %}"></script>
|
||||
<script>
|
||||
BtnClick("#btn_reset", 'reset', {{ unsecpwd|safe }})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
63
templates/reset_password.html
Normal file
63
templates/reset_password.html
Normal file
@@ -0,0 +1,63 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% block paneltitle %}重置密码{% endblock %}
|
||||
{% block middleblock %}
|
||||
<div class="layui-row">
|
||||
<form class="layui-form layui-form-pane" name="resetPassword" method="post" action="" autocomplete="off">{% csrf_token %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="username" lay-verify="required" lay-verType="tips" autocomplete="off" readonly value="{{ username }}" class="layui-input">
|
||||
<input type="hidden" id="code" name="code" readonly value="{{ code }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">新密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" lay-verify="pass" lay-verType="tips" name="new_password" id="new_password" placeholder="请输入新密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">确认密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" lay-verify="pass|repass" lay-verType="tips" name="ensure_password" id="ensure_password" placeholder="再次确认新密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button type="submit" lay-submit="" class="layui-btn layui-btn-normal layui-btn-fluid">立即提交</button>
|
||||
</div>
|
||||
<div class="layui-form-item a-middle-text">
|
||||
<span class="layui-breadcrumb">
|
||||
<a class="layui-text" href="/"><i class="layui-icon layui-icon-prev"></i> 返回主页</a>
|
||||
<a class="layui-text" id="redirect_url" href="/unlockAccount?code={{ code }}&username={{ username }}"><i class="layui-icon layui-icon-password"></i> 解锁账号</a>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block middleblockfoot %}
|
||||
<blockquote class="layui-elem-quote layui-quote-nm">
|
||||
新密码8至30位长度,要求包含大小写字母及数字。
|
||||
<p>会话有效期5分钟,重置密码会自动解锁账号(己禁用的账号不会生效)</p>
|
||||
</blockquote>
|
||||
{% endblock %}
|
||||
{% block footerjs %}
|
||||
<script src="{% static 'layui/layui.js' %}"></script>
|
||||
<script>
|
||||
layui.use(['form', 'jquery',], function () {
|
||||
let form = layui.form,
|
||||
$ = layui.jquery;
|
||||
form.verify({
|
||||
pass: [
|
||||
/^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}$/,
|
||||
'密码必须8到30位,要求包含大小写字母、数字与字符,且不能出现空格!'
|
||||
],
|
||||
repass: function (value,item) {
|
||||
if ($('#ensure_password').val() !== $('#new_password').val()) {
|
||||
return '两次输入密码不一致!';
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
31
templates/unlock.html
Normal file
31
templates/unlock.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% block paneltitle %}解锁账号{% endblock %}
|
||||
{% block middleblock %}
|
||||
<div class="layui-row">
|
||||
<form class="layui-form layui-form-pane" name="unlockAccount" method="post" action="unlockAccount" autocomplete="off">{% csrf_token %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="username" lay-verify="required" lay-verType="tips" autocomplete="off" readonly value="{{ username }}" class="layui-input">
|
||||
<input type="hidden" id="code" name="code" readonly value="{{ code }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button type="submit" lay-submit="" class="layui-btn layui-btn-normal layui-btn-fluid">立即提交</button>
|
||||
</div>
|
||||
<div class="layui-form-item a-middle-text">
|
||||
<span class="layui-breadcrumb">
|
||||
<a class="layui-text" href="/"><i class="layui-icon layui-icon-prev"></i> 返回主页</a>
|
||||
<a class="layui-text" id="redirect_url" href="/resetPassword?code={{ code }}&username={{ username }}"><i class="layui-icon layui-icon-refresh-1"></i> 重置密码</a>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block middleblockfoot %}
|
||||
<blockquote class="layui-elem-quote layui-quote-nm">
|
||||
新密码8至30位长度,要求包含大小写字母及数字。
|
||||
<p>会话有效期5分钟</p>
|
||||
</blockquote>
|
||||
{% endblock %}
|
@@ -1,59 +0,0 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>自助密码平台</title>
|
||||
<link rel="stylesheet" href="{% static 'css/dmaku.css' %}">
|
||||
<script type="text/javascript" src="{% static 'js/jquery-1.8.3.min.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'js/check.js' %}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="head-container" id="head-container">
|
||||
<p>
|
||||
密码自助服务平台
|
||||
</p>
|
||||
</div>
|
||||
<div class="middle-container" id="middle-container">
|
||||
<div class="form-container right-content-container">
|
||||
<form action="">
|
||||
</form>
|
||||
</div>
|
||||
<div class="form-container left-content-container">
|
||||
<form action="/" method="post" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<h1>修改密码</h1>
|
||||
<span>新密码8至30位长度,要求包含大小写字母及数字。</span>
|
||||
<input type="text" id="username" name="username" placeholder="账号,格式:abc\lisi、lisi、lisi@abc.com">
|
||||
<input type="password" id="old_password" name="old_password" placeholder="旧密码">
|
||||
<input type="password" id="new_password" name="new_password" placeholder="新密码">
|
||||
<input type="password" id="ensure_password" name="ensure_password" placeholder="再次确认新密码">
|
||||
<p></p>
|
||||
<button id="btn_modify" type="submit">提交</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="overlay-container">
|
||||
<div class="overlay">
|
||||
<div class="overlay-panel overlay-left">
|
||||
<h1>我要修改密码</h1>
|
||||
<p>记得自己的旧密码,需要自行修改</p>
|
||||
<p>⬇️⇓点它</p>
|
||||
<button class="ghost" id="modifyPwd">我要修改密码</button>
|
||||
</div>
|
||||
<div class="overlay-panel overlay-right">
|
||||
<h1>忘记密码或被锁</h1>
|
||||
<p>如果密码己遗忘,可通过使用⌊{{ scan_app }}⌉OAuth2授权通过身份验证后方可重置</p>
|
||||
<p>当弹出<b>是否同意授权</b>时,请务必<b>全部同意</b>,否则无法获取关键信息,导致无法正常重置/解锁账号!</p>
|
||||
<p>⬇️点它</p>
|
||||
<a class="ghost" href="https://open.weixin.qq.com/connect/oauth2/authorize?appid={{ app_id }}&agentid={{ agent_id }}&redirect_uri={{ redirect_url }}&response_type=code&scope=snsapi_privateinfo&state=#wechat_redirect">我要重置密码</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{% static 'js/dmaku.js' %}"></script>
|
||||
<script>
|
||||
let oauth2_inner = document.getElementsByClassName("form-container right-content-container")
|
||||
BtnClick("#btn_modify", 'modify',{{ unsecpwd|safe }})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user