index.blade.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <form class="modal-form form-prevent-multiple-submits" action="{{ route('address.store') }}" method="POST">
  2. @csrf
  3. <div class="form-title">
  4. <h3>내 자산 QR 코드 스캔</h3>
  5. </div>
  6. <div class="form-group text-center">
  7. <img src="{{ $prepare['url'] }}" alt="qrcode">
  8. </div>
  9. <div class="mb-2 text-center text-danger">
  10. <em>MSQUARE MARKET 어플을 이용해서 QR 코드 스캔을 하세요</em>
  11. </div>
  12. </form>
  13. @once
  14. <script>
  15. // TODO: medium-modal 각각 분리해서 hidden 이벤트 체크해야함
  16. $('#medium-modal').on('hidden.bs.modal', function () {
  17. clearInterval(balance_timer)
  18. });
  19. $(document).ready(async function(){
  20. balance_timer = setInterval(async function() {
  21. const response = await call_local_api('{{ route("wallet-balance.result") }}', { request_key: @json($prepare['request_key']) })
  22. const d = response.data
  23. if (d['status'] === 'completed') {
  24. update_balance_ui(d)
  25. $('#medium-modal.show').modal('hide')
  26. iziToast.success({ title: 'Success', message: $('#action-completed').text() })
  27. clearInterval(balance_timer)
  28. }
  29. }, 1000);
  30. });
  31. var balance_timer = null
  32. </script>
  33. @endonce