page1.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <meta name="viewport"
  4. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  5. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  6. <head>
  7. <meta charset="UTF-8">
  8. <title>扫码绑定简历</title>
  9. </head>
  10. <style>
  11. .container{
  12. height: 100vh;
  13. display: flex;
  14. /*align-items: center;*/
  15. justify-content: center;
  16. }
  17. .container > div{
  18. width: 300px;
  19. margin-top: 200px;
  20. }
  21. h1{
  22. font-size:30px;
  23. }
  24. p {
  25. font-size:20px;
  26. }
  27. </style>
  28. <body class="p-3">
  29. <div class="container">
  30. <div>
  31. <h1>请告知我们人事小伙伴为您查找简历吧... <br> 请稍等..</h1>
  32. <!-- 显示用户的 UUID -->
  33. <p class="alert alert-info">您的扫码标识: <strong>{{.UUID}}</strong></p>
  34. </div>
  35. </div>
  36. <script>
  37. var uuid = "{{.UUID}}";
  38. // 建立 SSE 连接,监听后端绑定事件
  39. var source = new EventSource("/resume/events?uuid=" + encodeURIComponent(uuid));
  40. source.addEventListener('bind', function(e) {
  41. var data = JSON.parse(e.data);
  42. // 当绑定后自动跳转到页面2,将 uuid 和 resume_id 作为参数传递
  43. window.location.href = "https://jybx2-webtest.jydev.jianyu360.com/succbi/zpgl/app/zpgl.app/biographical_notes.spg?:user=resume_visitor&:password=visitor123&notes_id=" + data.resume_id;
  44. }, false);
  45. source.onerror = function(e) {
  46. console.error("SSE error", e);
  47. };
  48. </script>
  49. </body>
  50. </html>