|
@@ -54,8 +54,8 @@
|
|
|
<input type="email" class="mb-1 form-control" id="email" placeholder="請輸入您的Email" required="required">
|
|
|
<div class="text-danger small" style="text-align: left;">* 會發送合約地址至您指定的Email</div>
|
|
|
</div>
|
|
|
- <div class="" id="userId"></div>
|
|
|
- <button type="button" class="event-nft-send btn btn-primary">同意接收</button>
|
|
|
+ <input class="" id="userid">
|
|
|
+ <button type="submit" class="btn btn-primary">同意接收</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -104,11 +104,25 @@ 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);
|
|
|
|
|
@@ -137,6 +151,7 @@ $(".nft-event").submit(function (e) {
|
|
|
console.log('送出失敗: ' + jqXHR.responseText);
|
|
|
}
|
|
|
});
|
|
|
+ return false;
|
|
|
});
|
|
|
|
|
|
$(document).ready(function () {
|
|
@@ -159,31 +174,11 @@ $(document).ready(function () {
|
|
|
console.log("您已登入");
|
|
|
}
|
|
|
|
|
|
- $('#userId').text(context.userId);
|
|
|
+ $('#userid').val(context.userId);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log('初始化失敗: ' + err.code + ", " + err.message);
|
|
|
});
|
|
|
-
|
|
|
- // 點擊「同意接收」按鈕
|
|
|
- $(".event-nft-send").click(function (e) {
|
|
|
- alert('.event-nft-send click'); // test
|
|
|
-
|
|
|
- var email = $('#email').val();
|
|
|
-
|
|
|
- // Email欄位必填檢查
|
|
|
- if (email == "") { // 未輸入Email
|
|
|
- Swal.fire({
|
|
|
- title: '注意!',
|
|
|
- icon: 'error',
|
|
|
- confirmButtonColor: '#3085d6',
|
|
|
- html: '請先輸入Email<p><p>我們會發送合約地址至您指定的Email',
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- $(".nft-event").submit();
|
|
|
- });
|
|
|
});
|
|
|
</script>
|
|
|
</html>
|