123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- @extends('mobile.module.layouts.content')
- @push('meta')
- @endpush
- @push('css')
- <link href="{{ theme_asset('mobile/css/members.css') }}" rel="stylesheet">
- @endpush
- @push('js')
- @endpush
- @section('content')
- <div class="list-top-txt list_height">您的身份信息验证成功,请设置新密码:</div>
- <form action="{{route($sub_site.'mobile.password.reset', ['token'=>$token])}}" id="resetForm" method="post">
- {{csrf_field()}}
- <div class="list-group">
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">新密码</div>
- <div class="describe font12"><input type="password" name="password" id="password" placeholder="请输入6-16位密码"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">确认密码</div>
- <div class="describe font12"><input type="password" name="password_confirmation" id="password_confirmation" placeholder="请再次输入新密码"></div>
- <div class="clear"></div>
- </div>
- </div>
- </form>
- <div class="btn-spacing mt4"><a id="resetPwdBtn" href="javascript:;" class="qs-btn qs-btn-blue font18">重置密码</a></div>
- @endsection
- @section('script')
- <script>
- /**
- * 重置密码验证
- */
- $('#resetPwdBtn').on('click', function () {
- var passwordValue = $.trim($('input[name=password]').val());
- var password1Value = $.trim($('input[name=password_confirmation]').val());
- if (passwordValue == '') {
- qsToast({type:2,context: '请输入密码'});
- return false;
- }
- if(!inputRegValiPassword(passwordValue)){
- qsToast({type:2,context: '密码长度要求为6-16个字符'});
- return false;
- }
- if (password1Value == '') {
- qsToast({type:2,context: '请再次输入新密码'});
- return false;
- }
- if(!inputRegValiPassword(password1Value)){
- qsToast({type:2,context: '密码长度要求为6-16个字符'});
- return false;
- }
- if(!inputRegValiPasswordRepeat(passwordValue,password1Value)){
- qsToast({type:2,context: '两次输入的密码不一致'});
- return false;
- }
- $('#resetForm').submit();
- });
- /**
- * 验证密码长度
- * @param value 密码
- * @returns {boolean}
- */
- function inputRegValiPassword(value){
- achoice = true;
- if(value.length>16 || value.length<6){
- achoice = false;
- }
- return achoice;
- }
- /**
- * 验证密码两次输入是否一致
- * @param password 第一次密码
- * @param passwordRepeat 第二次密码
- * @returns {boolean}
- */
- function inputRegValiPasswordRepeat(password,passwordRepeat){
- achoice = true;
- if(password!=passwordRepeat){
- achoice = false;
- }
- return achoice;
- }
- </script>
- @endsection
|