|
@@ -69,6 +69,18 @@
|
|
|
<label for="email" class="col-md-2 col-form-label">邮箱</label>
|
|
|
<input type="text" class="form-control col-md-5 round" name="email" id="email" value="{{Auth::getUser()->email}}"/>
|
|
|
</div>
|
|
|
+{{-- <div class="form-group form-material floating" data-plugin="formMaterial">--}}
|
|
|
+{{-- <div class="input-group" data-plugin="inputGroupFile">--}}
|
|
|
+{{-- <input type="text" class="form-control" name="verify_code" value="{{Request::old('verify_code')}}" required/>--}}
|
|
|
+{{-- <label class="floating-label" for="verify_code">{{trans('auth.captcha.attribute')}}</label>--}}
|
|
|
+{{-- <span class="input-group-btn">--}}
|
|
|
+{{-- <button class="btn btn-success" id="sendCode" onclick="sendVerifyCode()">--}}
|
|
|
+{{-- {{trans('auth.request')}}--}}
|
|
|
+{{-- </button>--}}
|
|
|
+{{-- </span>--}}
|
|
|
+{{-- </div>--}}
|
|
|
+{{-- </div>--}}
|
|
|
+
|
|
|
<div class="form-group row">
|
|
|
<label for="username" class="col-md-2 col-form-label">{{trans('validation.attributes.username')}}</label>
|
|
|
<input type="text" class="form-control col-md-5 round" name="username" id="username" value="{{Auth::getUser()->username}}"/>
|
|
@@ -107,4 +119,58 @@
|
|
|
@endsection
|
|
|
@section('javascript')
|
|
|
<script src="/assets/custom/jump-tab.js"></script>
|
|
|
+{{-- <script>--}}
|
|
|
+
|
|
|
+
|
|
|
+{{-- // 发送注册验证码--}}
|
|
|
+{{-- function sendVerifyCode() {--}}
|
|
|
+{{-- let flag = true; // 请求成功与否标记--}}
|
|
|
+{{-- let email = $('#email').val().trim();--}}
|
|
|
+
|
|
|
+
|
|
|
+{{-- if (email === '') {--}}
|
|
|
+{{-- swal.fire({title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.email')])}}', icon: 'warning', timer: 1500});--}}
|
|
|
+{{-- return false;--}}
|
|
|
+{{-- }--}}
|
|
|
+
|
|
|
+{{-- $.ajax({--}}
|
|
|
+{{-- method: 'POST',--}}
|
|
|
+{{-- url: '{{route('sendVerificationCode')}}',--}}
|
|
|
+{{-- dataType: 'json',--}}
|
|
|
+{{-- data: {_token: '{{csrf_token()}}', email: email},--}}
|
|
|
+{{-- success: function(ret) {--}}
|
|
|
+{{-- if (ret.status === 'success') {--}}
|
|
|
+{{-- swal.fire({title: ret.message, icon: 'success'});--}}
|
|
|
+{{-- $('#sendCode').attr('disabled', true);--}}
|
|
|
+{{-- flag = true;--}}
|
|
|
+{{-- } else {--}}
|
|
|
+{{-- swal.fire({title: ret.message, icon: 'error', timer: 1000, showConfirmButton: false});--}}
|
|
|
+{{-- $('#sendCode').attr('disabled', false);--}}
|
|
|
+{{-- flag = false;--}}
|
|
|
+{{-- }--}}
|
|
|
+{{-- },--}}
|
|
|
+{{-- error: function() {--}}
|
|
|
+{{-- swal.fire({title: '发送失败', icon: 'error'});--}}
|
|
|
+{{-- flag = false;--}}
|
|
|
+{{-- },--}}
|
|
|
+{{-- });--}}
|
|
|
+
|
|
|
+{{-- // 请求成功才开始倒计时--}}
|
|
|
+{{-- if (flag) {--}}
|
|
|
+{{-- // 60秒后才能重新申请发送--}}
|
|
|
+{{-- let left_time = 60;--}}
|
|
|
+{{-- const tt = window.setInterval(function() {--}}
|
|
|
+{{-- left_time--;--}}
|
|
|
+{{-- if (left_time <= 0) {--}}
|
|
|
+{{-- window.clearInterval(tt);--}}
|
|
|
+{{-- $('#sendCode').removeAttr('disabled').text('{{trans('auth.request')}}');--}}
|
|
|
+{{-- } else {--}}
|
|
|
+{{-- $('#sendCode').text(left_time + ' s');--}}
|
|
|
+{{-- }--}}
|
|
|
+{{-- }, 1000);--}}
|
|
|
+{{-- }--}}
|
|
|
+{{-- }--}}
|
|
|
+
|
|
|
+
|
|
|
+{{-- </script>--}}
|
|
|
@endsection
|