123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
- <link rel="stylesheet" type="text/css" href="/Public/Static/css/base.css" />
- <link rel="stylesheet" type="text/css" href="/Public/Static/css/nologed.css" />
- <title><?php echo ($webname); ?></title>
- <style>
- ::-webkit-input-placeholder { /* WebKit browsers */
- color: #b5b5b5;
- font-size: 18px;
- }
- ::-moz-placeholder { /* Mozilla Firefox 19+ */
- color: #b5b5b5;
- font-size: 18px;
- }
- input:focus{background:#F5F5F5;outline: 1px solid #F5F5F5;}
- a:hover,a:link,a:visited,a:active{color:#FCD535;text-decoration:none;}
- .boxh{height: 90px}
- .smsbtn{width:35%;float:right;height:50px;line-height:50px;border-radius:5px;background: #F5F5F5;text-align: center;}
- </style>
- </head>
- <body>
- <div class="container-fluid ctbox">
- <div class="no_header">
- <div onclick="goback();" class="fl bhalf allhg txtl" style="line-height:50px;">
- <i class="bi bi-arrow-left fcc fw" style="font-size:26px;"></i>
- </div>
- </div>
- <div class="no_content">
- <div class="no_title">
- <span class="title_txt fch"><?php echo L('重置密码');?></span>
- </div>
- <div class="no_inbox">
- <div class="inputbox boxh">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('重置密码');?></span>
- </div>
- <div class="input_div">
- <input type="text" class="cinput" id="email" name="email" placeholder="<?php echo L('重置密码');?>" />
- </div>
- </div>
- <div class="inputbox boxh">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('图形验证码');?></span>
- </div>
- <div class="input_div" style="width:60%;float:left;" >
- <input type="text" id="vcode" name="vcode" class="cinput" placeholder="<?php echo L('请输入图形验证码');?>" />
- </div>
- <div style="width:35%;float:right;padding:0px;" >
- <img style="width:100%;height:50px;border-radius:5px;" src="<?php echo U('Verify/code');?>" onclick="this.src=this.src+'?t='+Math.random()" title="<?php echo L('换一张');?>" id="verifycode">
- </div>
- </div>
- <div class="inputbox boxh">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('邮箱验证码');?></span>
- </div>
- <div class="input_div" style="width:60%;float:left;" >
- <input type="text" id="ecode" class="cinput" placeholder="<?php echo L('请输入邮箱验证码');?>" />
- </div>
- <div class="smsbtn" onclick="emailsend()" id="sendsms">
- <span class="fzmmm fcy" id="smsstr"><?php echo L('获取验证码');?></span>
- </div>
- </div>
- <div class="inputbox boxh">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('新密码');?></span>
- </div>
- <div class="input_div">
- <input type="password" id="lpwd" class="cinput" placeholder="<?php echo L('请输入新密码');?>" />
- </div>
- </div>
- </div>
- </div>
- <div class="no_button_box">
-
- <div onclick="resetpwd()" class="small_hs_btn">
- <i class="bi bi-arrow-right bi_right"></i>
- </div>
-
- </div>
- </div>
- </body>
- <body>
- <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
- <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
- <script type="text/javascript">
- function resetpwd(){
- var email = $("#email").val();
- var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
- if(email=='' || email == null){
- layer.msg("<?php echo L('请输入邮箱');?>");return false;
- }
- if(!reg.test(email)){
- layer.msg("<?php echo L('邮箱格式不正确');?>");return false;
- }
- var ecode = $("#ecode").val();
- if(ecode == ''){
- layer.msg("<?php echo L('请输入邮箱验证码');?>");return false;
- }
- var lpwd = $("#lpwd").val();
- if(lpwd == ''){
- layer.msg("<?php echo L('请输入密码');?>");return false;
- }
- $.post("<?php echo U('Login/resetpwd');?>",
- {'email':email,'ecode':ecode,'lpwd':lpwd},
- function(data){
- if(data.code == 1){
- layer.msg(data.info);
- setTimeout(function(){
- window.location.href = "<?php echo U('Login/index');?>";
- },2000);
- }else{
- layer.msg(data.info);return false;
- }
- });
- }
- </script>
- <script type="text/javascript">
- function emailsend(){
- var email = $("#email").val();
- var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
- if(email=='' || email == null){
- layer.msg("<?php echo L('请输入邮箱');?>");return false;
- }
- if(!reg.test(email)){
- layer.msg("<?php echo L('邮箱格式不正确');?>");return false;
- }
- var vcode = $("#vcode").val();
- if(vcode == ''){
- layer.msg("<?php echo L('请输入图形验证码');?>");return false;
- }
- $.post("<?php echo U('Login/findsendcode');?>",
- {'email':email,'vcode':vcode},
- function(data){
- if(data.code == 1){
- layer.msg(data.info);
- var obj = $("#sendsms");
- var strobj = $("#smsstr");
- var t = 60;
- var interval = setInterval(function() {
- obj.removeAttr('onclick');
- strobj.text(t + "<?php echo L('秒后再发送');?>");
- t--;
- if(t < 1){
- obj.attr("onclick","emailsend();");
- clearInterval(interval);
- strobj.text("<?php echo L('获取验证码');?>");
- }
- },1000);
- }else{
- layer.msg(data.info);
- $("#sendsms").attr("onclick","emailsend();");
- $("#smsstr").text("<?php echo L('获取验证码');?>");
- $("#verifycode").click();
- }
- });
- }
- </script>
- <script type="text/javascript">
- function goback(){
- window.history.back(-1);
- }
- </script>
- </html>
|