|
@@ -104,56 +104,6 @@ function nft_sent_message() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-// 點擊「同意接收」按鈕
|
|
|
-$(".nft-event").submit(function (e) {
|
|
|
- alert('.nft-event submit'); // test
|
|
|
-
|
|
|
- var email = $('#email').val();
|
|
|
-
|
|
|
- // Email欄位必填檢查
|
|
|
- if (email == "") { // 未輸入Email
|
|
|
- Swal.fire({
|
|
|
- title: '注意!',
|
|
|
- icon: 'error',
|
|
|
- confirmButtonColor: '#3085d6',
|
|
|
- html: '請先輸入Email<p><p>我們會發送合約地址至您指定的Email',
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- var jsonInfo = $('.nft-event').serializeObject();
|
|
|
- console.log(jsonInfo);
|
|
|
- var jsonString = JSON.stringify(jsonInfo);
|
|
|
- console.log(jsonString);
|
|
|
-
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: 'https://ark.cards:8228/event',
|
|
|
- data: jsonString,
|
|
|
- dataType: 'json',
|
|
|
- async: false,
|
|
|
- success: function (data) {
|
|
|
- console.log('送出成功: ' + JSON.stringify(data));
|
|
|
- alert("送出成功");
|
|
|
-
|
|
|
- // 呼叫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({
|