Files
g.hnyhua.cn/Mtxfw.VipSite/mobile/getpsd.html
2026-02-07 15:48:27 +08:00

260 lines
9.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html style="background:#114b57 url(image/login_bg.png) no-repeat 0 0; background-size: 100% 100%">
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>忘记密码</title>
<link rel="stylesheet" type="text/css" href="/css/api.css" />
<link rel="stylesheet" type="text/css" href="/css/content.css" />
<link rel="stylesheet" type="text/css" href="/css/switch.css" />
<script type="text/javascript" src="/scripts/jquery-2.0.2.min.js"></script>
<script type="text/javascript" src="/scripts/jquery.cookie.min.js"></script>
<script type="text/javascript" src="/script/main.js?t=0"></script>
<script type="text/javascript" src="/layer/layer.js"></script>
<script type="text/javascript" src="/Scripts/long.js"></script>
<script type="text/javascript" src="/script/api.js"></script>
<style>
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
color: #bbb;
}
html, body {
overflow: hidden;
background-color: #051E54;
}
.font_box {
color: #fff;
}
.uinput11 input {
background-color: rgba(255, 255, 255, .2);
border: 0;
color: #fff;
border: solid 1px #034859;
}
.regtype_box ul li {
float: left;
padding: 0.2em 0.4em;
margin: 0.5em 0;
margin-bottom: 0;
margin-right: 0.5em;
display: flex;
align-items: center;
justify-content: center;
line-height: 2em;
box-sizing: border-box;
cursor: pointer;
border-bottom: 0;
}
.regtype_box ul li.hover {
color: #FEBB0C;
border-bottom: 1px solid #FEBB0C;
}
.regtype_box ul li img {
width: 1.4em;
height: 1.4em;
margin-right: 0.2em;
border: 0;
}
</style>
</head>
<body>
<header class="renwuheader" id="aui-header">
<div class="ub">
<div class="nav-btn" id="nav-left" style=" margin:0; padding:0; padding-top:0.2em; min-width:4em" onclick="closeWin()">
<img src="image/faifei.png" style="margin-left:0; margin-top:0em; height:1.2em;width:1.2em;" />
</div>
<h1 class="ub-f1" tabindex="0" style=" margin:0; padding:0; position:relative; font-size:16px; ">
忘记密码
</h1>
<div class="nav-btn blue" id="nav-right" style=" margin:0; padding:0; min-width:4em">
</div>
</div>
</header>
<div class="up ub ub-ver" style="">
<!--header结束--><!--content开始-->
<div id="content" class="ub-f1 tx-l " style="padding: 0.8em;">
<div class="ub ub-ver" style="background-color:#0C225D;border-radius: .4em; border: solid 1px #20A7A3;">
<div class="ub uinput5" style="height: 2.5em;">
<img src="image/mobileico.png" id="phone_ico" style=" margin:0; padding:0; margin-left:0.5em; height:1.2em; width:1.2em; vertical-align: middle;">
<input style="width: 10em;background:none;" type="tel" id="phone" placeholder="请输入手机号" />
</div>
<div class="ub uinput5" style="margin:0;border-top: 1px solid #20A7A3;border-bottom: 1px solid #20A7A3;">
<div class="ub ub-f1" style="height: 2.5em;margin-right:.5em;padding:0 0.2em">
<img src="image/yzmico.png" style=" margin:0; padding:0; margin-top:0.7em; margin-left:0.3em; height:1.2em; width:1.2em; vertical-align: middle;">
<input class="ub ub-f1" type="number" maxlength="6" placeholder="请输入验证码" id="code" style=" margin-left:0.3em;background:none;" />
</div>
<input class="tx-c" id="getcode" type="button" style="border: 0;width: 6.5em;margin:0;height:2.5em;background:none;color:#23B6B2" value="获取验证码" onclick="oncode()" />
</div>
<div class="ub uinput5" style="height: 2.5em;border-bottom: none;">
<img src="image/pwdico0.png" style=" margin:0; padding:0; margin-left:0.5em; height:1.2em; width:1.2em; vertical-align: middle;">
<input style="width: 10em;background:none;" type="password" id="psd" placeholder="请输入新密码" />
</div>
<div class="ub uinput5" style="height: 2.5em;border-top: 1px solid #20A7A3;border-bottom: 1px solid #20A7A3;">
<img src="image/pwdico0.png" style=" margin:0; padding:0; margin-left:0.5em; height:1.2em; width:1.2em; vertical-align: middle;">
<input style="width: 10em;background:none;" type="password" placeholder="请再次输入新密码" id="psd2" />
</div>
<div class="ub ub-pc ub-ac" style="padding:0 0.8em;width:100%;box-sizing:border-box;">
<div id="reset" class="ub ub-ac ub-pc" onclick="reset()" style="color: #FFFFFF;padding: .6em 0em;margin: 1.5em 0;width:100%; border-radius: .4em;">
重置密码
</div>
</div>
</div>
</div>
<!--content结束-->
</div>
</body>
<script type="text/javascript">
function onregtype(t) {
$(".regtype_box ul li.hover").removeClass("hover");
$(".regtype_box ul li#regtype_" + t).addClass("hover");
if (t == 0) {
$("#phone").attr("placeholder", "请输入手机号码");
$("#phone_ico").attr("src","/image/mobileico.png");
} else {
$("#phone").attr("placeholder", "请输入电子邮箱");
$("#phone_ico").attr("src", "/image/emailico.png");
}
}
function oncode() {
var o = $("#getcode");
var type = $(".regtype_box ul li.hover").attr("data-type");
var phone = fTrim($("#phone").val());
if (phone != "") {
$("#getcode").val("发送中...");
$.getJSON("/apiajax.ashx?tt=00",
{ action: "sendphonecode0", phone: escape(phone), t: type },
function (data) {
if (data.status == 1) {
time(o);
} else {
tishi3(data.msg);
$("#getcode").val("获取验证码");
}
});
} else {
tishi3("手机号不能为空!");
}
}
var wait = 120;
function time(o) {
if (wait == 0) {
o.css("color", "#00C1F9");
o.val("获取验证码");
o.attr("disabled", false);
wait = 120;
} else {
o.css("color", "#gray");
o.val("重新发送(" + wait + ")");
o.attr("disabled", true);
wait = wait - 1;
setTimeout(function () {
time(o)
}, 1000)
}
}
function reset() {
var type = $(".regtype_box ul li.hover").attr("data-type");
var phone = fTrim($("#phone").val());
var code = fTrim($("#code").val());
var psd = fTrim($("#psd").val());
var psd2 = fTrim($("#psd2").val());
var title = "手机号码", title0 = "手机";
if (type == 1) {
title = "电子邮箱";
title0 = "电子邮箱";
}
var ifb = true;
if (ifb) {
if (phone == "") {
tishi3(title+"不能为空!");
$("#phone").focus();
ifb = false;
}
}
if (ifb) {
if (code == "") {
tishi3(title0 +"验证码不能为空!");
$("#code").focus();
ifb = false;
}
}
if (ifb) {
if (psd == "") {
tishi3("新密码不能为空!");
$("#psd").focus();
ifb = false;
}
}
var patrn = /^(?=.{6,16}$)[0-9a-zA-Z_]+$/;
if (ifb) {
if (!patrn.exec(psd)) {
tishi3("密码由6-16位数字、字母、下划线组成");
$("#psd").focus();
ifb = false;
}
}
if (ifb) {
if (psd2 == "") {
tishi3("确认新密码不能为空!");
$("#psd2").focus();
ifb = false;
}
}
if (ifb) {
if (psd2 != psd) {
tishi3("两次输入密码不一致!");
$("#psd2").focus();
ifb = false;
}
}
if (ifb) {
$("#reset").html("请稍候...");
var datas = {
phone: phone,
code: code,
password: psd,
t: type
}
$.ajax({
type: 'POST',
url: "/apiajax.ashx?action=forgetPassword&ifweb=1",
data: datas,
dataType: "json",
error: function (xhr) {
tishi3("发生错误:" + JSON.stringify(xhr));
},
success: function (data) {
$("#reset").html("重置密码");
tishi3(data.msg);
if (data.status == 1) {
closeWin();
}
}
});
}
}
</script>
</html>