|
@@ -248,48 +248,30 @@ $(".collect-send").submit(function (e) {
|
|
|
var jsonString = JSON.stringify(jsonInfo);
|
|
|
console.log(jsonString);
|
|
|
|
|
|
- Swal.fire({
|
|
|
- title: '您是否確認要發送?',
|
|
|
- text: "發送後,NFT將從您的錢包轉移至接收者的錢包!",
|
|
|
- icon: 'warning',
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonColor: '#3085d6',
|
|
|
- cancelButtonColor: '#d33',
|
|
|
- confirmButtonText: '立即發送',
|
|
|
- cancelButtonText: '取消'
|
|
|
- }).then((result) => {
|
|
|
- if (result.isConfirmed) {
|
|
|
- $.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: '發送成功'
|
|
|
- });
|
|
|
- },
|
|
|
- beforeSend: function () {
|
|
|
- console.log('beforeSend');
|
|
|
- },
|
|
|
- complete: function () {
|
|
|
- console.log('complete');
|
|
|
- location.reload();
|
|
|
- },
|
|
|
- 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));
|
|
|
+ alert("發送成功");
|
|
|
+ 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) {
|