123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
- <title>WHAT'S NEXT 永續峰會|NFT方舟加密藝術跨界直播-「風」 | ARK Cards</title>
-
- <link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
- integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
- <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css" />
- <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick-theme.css" />
- <link rel="stylesheet" href="./style.css">
- </head>
- <body>
- <section id="sec01" class="sec01 container-fluid px-0 mx-0 mb-5">
- <div class="card bg-transparent text-white border-0">
- <img src="./img/1618431559-GettyImages-1309739877.jpg" class="img-fluid" alt="...">
- <div style="position: relative;" class="card-img-overlay p-0 d-flex align-items-end justify-content-center">
- <h5 style="background: rgba(0,0,0,0.7); font-size: 16px; position: absolute; z-index: 20;" class="card-title p-4 w-50 text-center fw-bold">現場活動好康</h5>
- </div>
- </div>
- </section>
- <form class="nft-event" action="">
- <section id="sec05-moblie" class="sec05 my-4">
- <div class="sec05-moblie container-fluid">
- <div class="sec05-moblie-header">
- <h1 class="secn-title ps-2">您可以獲得台北方舟「風」通行證 + 港記酥皇 NFT</h1>
- </div>
- <p class="text-start mb-2">※ 點選【同意接收】按鈕,即可獲得</p>
- <p class="text-start mb-2">※ 若於取得贈送之「風」通行證 + 港記酥皇 NFT後,發送給他人,將不會再重覆贈送</p>
- <div class="sec06-nft-mall row row-cols-1 row-cols-md-4 g-4">
- <div class="col">
- <div class="card h-100">
- <!-- <a class="event-nft-send mb-2" target="_blank">
- <img src="https://ark.cards/img/nft/wind.png" class="card-img-top" alt="風的通行證">
- </a> -->
- <video loop autoplay muted style="width:100%;">
- <source src="https://ark.cards/img/nft/wind.mp4" type="video/mp4">
- Your browser does not support the video tag.
- </video>
- <div class="mt-3" style="background-color:#231D20;">
- <video loop autoplay muted style="width:100%;">
- <source src="https://ark.cards/img/nft/kongkee.mp4" type="video/mp4">
- Your browser does not support the video tag.
- </video>
- </div>
- <div class="card-body text-center">
- <div class="mb-3">
- <input type="email" class="mb-1 form-control" id="email" placeholder="請輸入您的Email">
- <div class="text-danger small" style="text-align: left;">* 會發送合約地址至您指定的Email</div>
- </div>
- <input class="d-none" id="userid">
- <button type="submit" class="btn btn-primary">同意接收</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- </form>
- <footer style="background: #484848;" class="py-4 w-100 px-0 mx-0">
- <p class="text-white text-center mb-0">Copyright 2021 版權所有 © Ark.Cards</p>
- </footer>
- <script src="https://unpkg.com/aos@next/dist/aos.js"></script>
- <script>
- AOS.init();
- </script>
- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
- integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
- crossorigin="anonymous"></script>
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js"
- integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT"
- crossorigin="anonymous"></script>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
- <script type="text/javascript" src="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script>
- <script src="./goto.js"></script>
- <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
- <script charset="utf-8" src="https://static.line-scdn.net/liff/edge/2/sdk.js"></script>
- </body>
- <script>
- // 「風」通行證 + 「港記酥皇」已送出訊息通知
- function nft_sent_message() {
- Swal.fire({
- icon: 'success',
- confirmButtonColor: '#3085d6',
- html: '加入 Ark Cards 好友</p>點擊【我的NFT收藏】</p>即可收到「風」通行證 + 「港記酥皇」'
- }).then((result) => {
- if (result.isConfirmed) {
- window.location.replace('https://liff.line.me/1645278921-kWRPP32q/?accountId=067ztnge');
- }
- });
- }
- // Email格式檢查
- function validate_email(email) {
- const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
- return re.test(String(email).toLowerCase());
- }
- // 點擊「同意接收」按鈕
- $(".nft-event").submit(function (e) {
- var email = $('#email').val();
- var userid = $('#userid').val();
- console.log('email = ' + email + ', userid = ' + userid); // test
- // Email欄位必填檢查
- if (email == "") { // 未輸入Email
- Swal.fire({
- title: '注意!',
- icon: 'error',
- confirmButtonColor: '#3085d6',
- html: '請先輸入Email<p><p>我們會發送合約地址至您指定的Email'
- });
- return false;
- } else {
- if (!validate_email(email)) {
- Swal.fire({
- title: 'Email格式錯誤',
- icon: 'error',
- confirmButtonColor: '#3085d6',
- html: '請輸入正確的Email<p><p>我們會發送合約地址至您指定的Email'
- });
- return false;
- }
- }
- var jsonInfo = {"email": email, "userid": userid};
- var jsonString = JSON.stringify(jsonInfo);
- console.log(jsonString);
- $.ajax({
- type: 'POST',
- url: 'https://api.ptt.cx:8750/api/v1/line/event',
- data: jsonString,
- dataType: 'json',
- async: false,
- success: function (data) {
- console.log('送出成功: ' + JSON.stringify(data));
- // 呼叫fastAPI,贈送「風」通行證 + 「港記酥皇」
- nft_sent_message();
- },
- beforeSend: function () {
- console.log('beforeSend');
- },
- complete: function () {
- console.log('complete');
- },
- error: function (jqXHR, textStatus, errorThrown) {
- console.log(JSON.stringify(jqXHR));
- console.log("AJAX errr: " + textStatus + ' : ' + errorThrown);
- console.log('送出失敗: ' + jqXHR.responseText);
- }
- });
- return false;
- });
- $(document).ready(function () {
- // 取得liff_id
- liff.init({
- liffId: "1656404434-DoEqYOad"
- })
- .then(() => {
- var context = liff.getContext();
- console.log(context);
- var profile = liff.getProfile();
- console.log(profile);
- // login
- if (!liff.isLoggedIn()) {
- console.log("您未登入");
- console.log('context.userId = ' + context.userId); // test
- liff.login({ redirectUri: "https://ark.cards/event.html" }); // test
- } else {
- console.log("您已登入");
- }
- $('#userid').val(context.userId);
- })
- .catch((err) => {
- console.log('初始化失敗: ' + err.code + ", " + err.message);
- });
- });
- </script>
- </html>
|