qr-code.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  8. <META HTTP-EQUIV="Expires" CONTENT="-1">
  9. <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
  10. <title>ARK.Cards</title>
  11. <link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
  12. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
  13. integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
  14. <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css" />
  15. <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick-theme.css" />
  16. <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.css" rel="stylesheet" />
  17. <link rel="stylesheet" href="./style.css">
  18. </head>
  19. <body style="background:#484848;">
  20. <section class="sec01-qrcode container-fluid px-0 mx-0">
  21. <div class="card border-0 text-white">
  22. <img src="./img/banner.png" class="card-img" alt="...">
  23. <div class="card-img-overlay d-flex align-items-center justify-content-center">
  24. <h5 class="card-title">我要接收</h5>
  25. </div>
  26. </div>
  27. </section>
  28. <section class="sec02-qrcode container-fluid px-0 mx-0 text-center">
  29. <div class="mb-3" id="Qrcode">
  30. <!-- <img class="img-fluid" src="./img/qrcode.png" alt=""> -->
  31. </div>
  32. <button style="margin: 0; padding: 0; border:none; outline: none; background: none;" type="button" onclick="copyEvent('copy')">
  33. <img src="./img/copy.png" alt="">
  34. </button>
  35. <!-- <img class="m-3" src="./img/share.png" alt=""> -->
  36. <div>
  37. <p style="font-size: 14px;" class="mt-1 text-white">我接收的地址:</p>
  38. <p id="copy" style="font-size: 14px;" class="mt-1 text-white"></p>
  39. </div>
  40. </section>
  41. <footer style="background: #484848;" class="pb-4 w-100 px-0 mx-0">
  42. <p class="text-white text-center mb-0">Copyright 2021 版權所有 © Ark.Cards</p>
  43. </footer>
  44. <script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
  45. <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.js"></script>
  46. <script src="https://unpkg.com/aos@next/dist/aos.js"></script>
  47. <script>
  48. AOS.init();
  49. </script>
  50. <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
  51. integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
  52. crossorigin="anonymous"></script>
  53. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js"
  54. integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT"
  55. crossorigin="anonymous"></script>
  56. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  57. <script type="text/javascript" src="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script>
  58. <script src="./goto.js"></script>
  59. <script charset="utf-8" src="https://static.line-scdn.net/liff/edge/2/sdk.js"></script>
  60. </body>
  61. <script>
  62. $(document).ready(function () {
  63. liff.init({
  64. liffId: "1656404434-Bg83Zm0j"
  65. })
  66. .then(() => {
  67. var context = liff.getContext();
  68. console.log(context);
  69. var profile = liff.getProfile();
  70. console.log(profile);
  71. // login
  72. if (!liff.isLoggedIn()) {
  73. console.log("您未登入");
  74. console.log('context.userId = ' + context.userId); // test
  75. liff.login({ redirectUri: "https://ark.cards/qr-code.html?"+context.userId }); // test
  76. //liff.login({ redirectUri: "https://liff.line.me/1656404434-Bg83Zm0j?"+context.userId }); // test
  77. } else {
  78. console.log("您已登入");
  79. }
  80. // Qrcode頁面
  81. get_data(context.userId);
  82. })
  83. .catch((err) => {
  84. console.log('初始化失敗: ' + err.code + ", " + err.message);
  85. });
  86. });
  87. </script>
  88. </html>