|
@@ -259,44 +259,38 @@ $(".collect-send").submit(function (e) {
|
|
|
cancelButtonText: '取消'
|
|
|
}).then((result) => {
|
|
|
if (result.isConfirmed) {
|
|
|
- Swal.fire({
|
|
|
- icon: 'success',
|
|
|
- confirmButtonColor: '#3085d6',
|
|
|
- html: '發送成功'
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: 'https://ark.cards:8228/send',
|
|
|
+ data: jsonString,
|
|
|
+ dataType: 'json',
|
|
|
+ async: false,
|
|
|
+ success: function (data) {
|
|
|
+ console.log('發送成功: ' + JSON.stringify(data));
|
|
|
+
|
|
|
+ Swal.fire({
|
|
|
+ icon: 'success',
|
|
|
+ confirmButtonColor: '#3085d6',
|
|
|
+ html: '發送成功'
|
|
|
+ });
|
|
|
+
|
|
|
+ location.reload();
|
|
|
+ },
|
|
|
+ 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;
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: 'https://ark.cards:8228/send',
|
|
|
- data: jsonString,
|
|
|
- dataType: 'json',
|
|
|
- async: false,
|
|
|
- success: function (data) {
|
|
|
- console.log('發送成功: ' + JSON.stringify(data));
|
|
|
-
|
|
|
- Swal.fire({
|
|
|
- icon: 'success',
|
|
|
- confirmButtonColor: '#3085d6',
|
|
|
- html: '發送成功'
|
|
|
- });
|
|
|
-
|
|
|
- location.reload();
|
|
|
- },
|
|
|
- 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;
|
|
|
});
|
|
|
|
|
|
$(".nft-buy").submit(function (e) {
|
|
@@ -313,7 +307,13 @@ $(".nft-buy").submit(function (e) {
|
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
console.log('購買成功: ' + data);
|
|
|
- alert("購買成功");
|
|
|
+
|
|
|
+ Swal.fire({
|
|
|
+ icon: 'success',
|
|
|
+ confirmButtonColor: '#3085d6',
|
|
|
+ html: '購買成功'
|
|
|
+ });
|
|
|
+
|
|
|
location.reload();
|
|
|
},
|
|
|
beforeSend: function () {
|