123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>重置密码-{eyou:global name='web_name' /}</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
- <link href="{eyou:global name='web_cmspath' /}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
- {eyou:static file="users/skin/css/basic.css" /}
- {eyou:static file="users/skin/css/eyoucms.css" /}
- {eyou:include file="users/skin/css/diy_css.htm" /}
-
- {eyou:static file="/public/static/common/js/jquery.min.js"/}
- {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
- {eyou:static file="users/skin/js/global.js" /}
- </head>
-
- <body class="reg">
-
- <div class="register_index ey-member">
- <div class="container">
- <form name='theForm' id="theForm" class="form-register panel-body fv-form">
- <div class="mip-reg-logo"><a href="{eyou:global name='web_cmsurl' /}" class="ey-logo"><img src="{eyou:global name='web_logo'/}" /></a></div>
- <div class="mip-reg-heading"><a class="nav-item " href="javascript:void(0)" style="cursor: unset;">重置密码</a></div>
- <div class="form-group group_z">
- <div class="input-group">
- <input type="text" class="form-control" value="{$username|default=''}" disabled="true"/>
- </div>
- </div>
-
- <div class="form-group group_z">
- <div class="input-group">
- <input type="password" name="password" id="password" class="form-control" placeholder="新密码"/>
- </div>
- </div>
-
- <div class="form-group group_z">
- <div class="input-group input-group-icon">
- <input type="password" name="password_" id="password_" class="form-control" placeholder="确认新密码"/>
- </div>
- </div>
-
- <button id="submitButton" class="btn btn-lg btn-primary btn-block group_z h60 disabled-button" disabled="disabled" style="width: 100%;" onclick="check_submit();" type="button">确认提交</button>
- <div class="login-link clearfix"><a class="fr tr" href="{eyou:url link='user/Users/login' /}">返回登录</a></div>
- </form>
- </div>
- </div>
-
- <script type="text/javascript">
- $(document).keydown(function(event){
- if(event.keyCode ==13) check_submit();
- });
- var input = document.getElementById('password');
- var input = document.getElementById('password_');
-
- var submitButton = document.getElementById('submitButton');
-
- input.addEventListener('input', function() {
- if (input.value.length > 0) {
- submitButton.disabled = false;
- submitButton.classList.remove('disabled-button');
- submitButton.classList.add('enabled-button');
- } else {
- submitButton.disabled = true;
- submitButton.classList.remove('enabled-button');
- submitButton.classList.add('disabled-button');
- }
- });
- function check_submit()
- {
- var password = $('#theForm input[name=password]').val();
- var password_ = $('#theForm input[name=password_]').val();
-
- if(password == ''){
- layer.msg('新密码不能为空!', {time: 1000});
- $('#theForm input[name=password]').focus();
- return false;
- }
-
- if(password_ == ''){
- layer.msg('确认密码不能为空!', {time: 1000});
- $('#theForm input[name=password_]').focus();
- return false;
- }
-
- {$pwdJsCode|default=''}
-
- if(password != password_){
- layer.msg('两次密码不一致!', {time: 1000});
- $('#theForm input[name=password]').focus();
- return false;
- }
-
- layer_loading('正在处理');
- $.ajax({
- url: "{eyou:url link='user/Users/reset_password_mobile' /}",
- data: $('#theForm').serialize(),
- type:'post',
- dataType:'json',
- success:function(res){
- layer.closeAll();
- if (res.code == 1) {
- layer.msg(res.msg, {time: 1500}, function(){
- window.location.href = res.url;
- });
- } else {
- layer.msg(res.msg, {time: 2000, icon: 5});
- }
- },
- error : function(e) {
- layer.closeAll();
- showErrorAlert(e.responseText);
- }
- });
- };
- </script>
- </body>
- </html>
|