123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- @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="qs-top-nav x2 list_height">
- <div class="n-cell" onclick="javascript:location.href='{{route('mobile.password.request.mobile', ['utype'=>$utype])}}'">已验证手机找回<div class="b-line"></div></div>
- <div class="n-cell active">已绑定邮箱找回<div class="b-line"></div></div>
- <div class="clear"></div>
- </div>
- <div class="split-block"></div>
- <form action="post" id="getPassByEmailForm">
- {{csrf_field()}}
- <div class="loging-input-group">
- <div class="group-list email">
- <input id="email" name="email" type="text" class="l-input font14" placeholder="请输入您注册的电子邮箱" autocomplete="off">
- </div>
- </div>
- <div class="l-tool-bar list_height">
- <div class="for-pwd link_gray6"><a href="{{route($sub_site."mobile.appeal")}}">账号申诉</a></div>
- <div class="clear"></div>
- </div>
- <input type="hidden" name="utype" value="{{$utype}}" />
- <input type="hidden" name="type" value="email" />
- <div id="pop" style="display:none"></div>
- </form>
- <div class="btn-spacing"><a id="sendEmailBtn" href="javascript:;" class="qs-btn qs-btn-blue font18">发送验证邮件</a></div>
- @endsection
- @section('script')
- <script type="text/javascript" src="{{ theme_asset('app/js/regular.js') }}"></script>
- <script>
- /**
- * 发送验证邮件
- */
- $('#sendEmailBtn').on('click', function() {
- var emailValue = $.trim($('input[name=email]').val());
- if (emailValue == '') {
- qsToast({type:2,context: '请输入邮箱'});
- return false;
- }
- if (emailValue != "" && !regularEmail.test(emailValue)) {
- qsToast({type:2,context: '邮箱格式不正确'});
- return false;
- }
- if (remoteValid('email',emailValue)) {
- qsToast({type:2,context: '该邮箱没有注册账号'});
- return false;
- }
- $.ajax({
- url: "{{route($sub_site.'mobile.password.request')}}",
- cache: false,
- async: false,
- type: 'post',
- dataType: 'json',
- data: $('#getPassByEmailForm').serialize(),
- success: function (data) {
- //qsToast({type:2,context: "注册成功,正在为你跳转.."});
- setTimeout(function () {
- window.location.href = data.data.url;
- },1000)
- },
- error:function(errorData) {
- //$('#btnRegPersonal').text('注册个人会员').removeClass('btn_disabled').prop('disabled', 0);
- var response=$.parseJSON(errorData.response);
- if (errorData.status==422) {//验证错误
- $.each(response.errors,function (key,val) {
- qsToast({type:2,context: val[0]});
- return false;
- });
- }
- else if(errorData.status==400) {//业务错误
- qsToast({type:2,context: response.message});
- }
- }
- });
- });
- /**
- * 验证用户名等是否重复
- * @param validType 验证类型
- * @param validValue 值
- * @returns {boolean|*}
- */
- function remoteValid(validType, validValue){
- var result = false;
- $.ajax({
- url: "{{route('register.check', ['utype'=>$utype])}}",
- cache: false,
- async: false,
- type: 'post',
- dataType: 'json',
- data: { type: validType, param: validValue },
- success: function(json) {
- result= true;
- }
- });
- return result;
- }
- </script>
- @endsection
|