goto.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. $('.sec05-moblie-container').slick({
  2. arrows: false,
  3. slidesToShow: 1,
  4. slidesToScroll: 1,
  5. infinite: false,
  6. centerMode: true,
  7. });
  8. console.log(1);
  9. // $(document).ready(function () {
  10. // function get_data(){
  11. // $.ajax({
  12. // method: "GET",
  13. // // url:"https://api.ptt.cx:8228/collection/""+userid+",
  14. // url:"https://api.ptt.cx:8228/collection/U176663ce100ebb1f4c404d48749decb1_test_000_000_000",
  15. // dataType: "json",
  16. // })
  17. // .done(function (msg) {
  18. // console.log(msg);
  19. // });
  20. // }
  21. // get_data();
  22. // });
  23. // console.log(location.href);
  24. $(document).ready(function () {
  25. function get_data(){
  26. $.ajax({
  27. method: "GET",
  28. url:"https://api.ptt.cx:8228/receive/Uf161c92b16f84357987a78c2b4b47719",
  29. dataType: "json",
  30. })
  31. .done(function (msg) {
  32. console.log(msg);
  33. console.log(msg.base)
  34. var Qrcodeimg='';
  35. var useraddress='';
  36. Qrcodeimg +='\
  37. <img src="data:image/png;base64,'+msg.base+'" alt="">\
  38. ';
  39. useraddress +='\
  40. '+msg.useraddress+'\
  41. ';
  42. $('#Qrcode').html(Qrcodeimg);
  43. $('#copy').html(useraddress);
  44. });
  45. }
  46. get_data();
  47. });
  48. function copyEvent(id)
  49. {
  50. var str = document.getElementById(id);
  51. window.getSelection().selectAllChildren(str);
  52. document.execCommand("Copy")
  53. toastr.options = {
  54. // 參數設定[註1]
  55. "closeButton": false, // 顯示關閉按鈕
  56. "debug": false, // 除錯
  57. "newestOnTop": false, // 最新一筆顯示在最上面
  58. "progressBar": false, // 顯示隱藏時間進度條
  59. "positionClass": "toast-top-center", // 位置的類別
  60. "preventDuplicates": false, // 隱藏重覆訊息
  61. "onclick": null, // 當點選提示訊息時,則執行此函式
  62. "showDuration": "300", // 顯示時間(單位: 毫秒)
  63. "hideDuration": "1000", // 隱藏時間(單位: 毫秒)
  64. "timeOut": "1000", // 當超過此設定時間時,則隱藏提示訊息(單位: 毫秒)
  65. "extendedTimeOut": "1000", // 當使用者觸碰到提示訊息時,離開後超過此設定時間則隱藏提示訊息(單位: 毫秒)
  66. "showEasing": "swing", // 顯示動畫時間曲線
  67. "hideEasing": "linear", // 隱藏動畫時間曲線
  68. "showMethod": "fadeIn", // 顯示動畫效果
  69. "hideMethod": "fadeOut" // 隱藏動畫效果
  70. }
  71. toastr.success( "複製成功" );
  72. }