find-member-id-verify.blade.php 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. @extends('views.layouts.master')
  2. <link rel="stylesheet" href="{{ csset('/themes/pro/modunawa/resources/css/user-auth.css') }}">
  3. @section('content')
  4. <!--=====================================
  5. USER FORM PART START
  6. =======================================-->
  7. <section class="user-form-part">
  8. <div class="container">
  9. <form class="row justify-content-center form-prevent-multiple-submits" action="{{ $route }}" method="POST">
  10. @csrf
  11. <div class="col-12 col-sm-10 col-md-12 col-lg-12 col-xl-6">
  12. <!--
  13. <div class="user-form-logo">
  14. <a href="index.html"><img src="images/logo.png" alt="logo"></a>
  15. </div>
  16. -->
  17. <div class="user-form-card agree_form">
  18. <div class="user-form-title">
  19. <h2>본인인증</h2>
  20. </div>
  21. <div class="form-check all_agree mb-4">
  22. <input class="form-check-input" type="checkbox" id="phone-identity-verifiy-ck">
  23. <label class="form-check-label" for="phone-identity-verifiy-ck">휴대폰 본인 확인</label>
  24. </div>
  25. <div class="form-group mb-2 d-flex">
  26. <input type="text" class="form-control certi-txt rounded-right-0" id="mobile-no-txt" maxlength="11" placeholder="휴대폰번호">
  27. <span class="btn_wrap js_btn_wrapper mt-0">
  28. <button type="button" class="btn bg-black border-black btn-block text-white certi-btn" onclick="send_verify_code(this)">인증번호 발송</button>
  29. </span>
  30. </div>
  31. <div class="form-group mb-0 d-flex">
  32. <input type="text" class="form-control certi-txt rounded-right-0" name="cert_number" placeholder="인증번호" required>
  33. <span class="btn_wrap js_btn_wrapper mt-0">
  34. <button type="submit" class="btn bg-black border-black btn-block text-white certi-btn button-prevent-multiple-submits">
  35. <i class="spinner fa fa-spinner fa-spin"></i>
  36. 확인
  37. </button>
  38. </span>
  39. </div>
  40. </div>
  41. </div>
  42. </form>
  43. </div>
  44. </section>
  45. <!--=====================================
  46. USER FORM PART END
  47. =======================================-->
  48. @endsection
  49. @push('js')
  50. <script>
  51. async function send_verify_code($this) {
  52. let all_check = true
  53. $('#required-div input').each(function () {
  54. if (! $(this).is(':checked')) {
  55. all_check = false
  56. }
  57. })
  58. if (all_check && $('#phone-identity-verifiy-ck').is(':checked')) {
  59. const response = await call_local_api('{{ route("member-signup-verify.send") }}', {mobile_no: $('#mobile-no-txt').val()})
  60. const error_msg = response.data.original.body
  61. if (error_msg['message'] === 'success') {
  62. $($this).prop('disabled', true)
  63. iziToast.success({ title: 'Success', message: $('#action-completed').text() })
  64. } else {
  65. iziToast.error({ title: 'Error', message: error_msg['message'] })
  66. }
  67. return
  68. }
  69. iziToast.info({ title: 'Info', message: '이용약관에 동의하셔야 합니다' });
  70. }
  71. $('#mobile-no-txt').on('keyup', function () {
  72. $(this).val($(this).val().replace(/[^0-9]/g, ''));
  73. });
  74. $('#all-ck').click(function(){
  75. const checked = $(this).is(':checked');
  76. if (checked) {
  77. $('#required-div input:checkbox').prop('checked', true);
  78. }
  79. });
  80. </script>
  81. @endpush