|
@@ -617,39 +617,47 @@
|
|
|
<!-- Template Main JS File -->
|
|
|
<script src="assets/js/main.js"></script>
|
|
|
|
|
|
+ <!-- Ark Cards JS File -->
|
|
|
+ <script src="assets/js/ark.js"></script>
|
|
|
+
|
|
|
<script>
|
|
|
-// 帳號登入
|
|
|
-$("#btn_mint").click(function() {
|
|
|
- var toaddress = $('#toaddress').val();
|
|
|
- var amount = $('#amount').val();
|
|
|
-
|
|
|
- var param_string = {
|
|
|
- toaddress: toaddress,
|
|
|
- amount: amount
|
|
|
- };
|
|
|
-
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: 'https://api.ptt.cx:8750/api/v1/joyso/mint',
|
|
|
- data: param_string,
|
|
|
- success: function(res, textStatus, jqXHR) {
|
|
|
- console.log(res); // test
|
|
|
- }, error: function(xhr, status, error) {
|
|
|
- // {"detail":[{"loc":["body"],"msg":"value is not a valid dict","type":"type_error.dict"}]}
|
|
|
- var res = JSON.parse(xhr.responseText);
|
|
|
- console.log(res.detail[0].msg); // test
|
|
|
-
|
|
|
- Swal.fire({
|
|
|
- title: '注意',
|
|
|
- icon: 'error',
|
|
|
- // text: res.detail[0].msg,
|
|
|
- text: 'API目前有問題,暫時無法執行此操作',
|
|
|
- confirmButtonColor: '#3085d6'
|
|
|
- });
|
|
|
- }
|
|
|
+$(document).ready(function($) {
|
|
|
+ // 檢查是否可存取該頁面
|
|
|
+ checkRoute();
|
|
|
+
|
|
|
+ // 帳號登入
|
|
|
+ $("#btn_mint").click(function() {
|
|
|
+ var toaddress = $('#toaddress').val();
|
|
|
+ var amount = $('#amount').val();
|
|
|
+
|
|
|
+ var param_string = {
|
|
|
+ toaddress: toaddress,
|
|
|
+ amount: amount
|
|
|
+ };
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: 'https://api.ptt.cx:8750/api/v1/joyso/mint',
|
|
|
+ data: param_string,
|
|
|
+ success: function(res, textStatus, jqXHR) {
|
|
|
+ console.log(res); // test
|
|
|
+ }, error: function(xhr, status, error) {
|
|
|
+ // {"detail":[{"loc":["body"],"msg":"value is not a valid dict","type":"type_error.dict"}]}
|
|
|
+ var res = JSON.parse(xhr.responseText);
|
|
|
+ console.log(res.detail[0].msg); // test
|
|
|
+
|
|
|
+ Swal.fire({
|
|
|
+ title: '注意',
|
|
|
+ icon: 'error',
|
|
|
+ // text: res.detail[0].msg,
|
|
|
+ text: 'API目前有問題,暫時無法執行此操作',
|
|
|
+ confirmButtonColor: '#3085d6'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return false;
|
|
|
});
|
|
|
-
|
|
|
- return false;
|
|
|
});
|
|
|
</script>
|
|
|
|