忘记密码

来源:官方· 作者 jizhicms· 54次点击 · 5个月前

基础

模板:user/forget.html

提交接口: /login/forget

提交参数:

email: 绑定的邮箱

vercode: 验证码,生成规则:

{fun U('Common/vercode',['code_name'=>'forget_code'])}


忘记密码需要配置邮箱,否则无法发送邮件重置密码! 配置邮件


<form method="POST" onsubmit="return checklogin()" class="user-form">
        <div class="form-control">
        <label for="email">绑定邮箱</label>
        <input class="form-control item" type="email" name="email" id="email">
        </div>
        <div class="form-control">
        <label for="yzm">验证码</label>
        <input placeholder="请输入图形验证码" style="" type="text" name="vercode" id="vercode"><img style="width:150px;" src="{fun U('Common/vercode',['code_name'=>'forget_code'])}" onclick="this.src=this.src+'?'+Math.random()">   
        </div>
        <div class="form-control">
         <label for="submit"></label>
            <input type="submit" name="submit" value="确定">
        </div>
        </form>
function checklogin(){
  if($.trim($("#email").val())==''){
    alert('邮箱不能为空~');
    return false;
  }
  if($.trim($("#vercode").val())==''){
    alert('图形验证码不能为空~');
    return false;
  }
  
  return true;
}



被收藏 0  ∙  0 赞  
加入收藏
0 回复  
善言善语 (您需要 登录 后才能回复 没有账号 ?)

请先登录网站