1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- $('.sec05-moblie-container').slick({
- arrows: false,
- slidesToShow: 1,
- slidesToScroll: 1,
- infinite: false,
- centerMode: true,
- });
- console.log(1);
- // $(document).ready(function () {
- // function get_data(){
- // $.ajax({
- // method: "GET",
- // // url:"https://api.ptt.cx:8228/collection/""+userid+",
- // url:"https://api.ptt.cx:8228/collection/U176663ce100ebb1f4c404d48749decb1_test_000_000_000",
- // dataType: "json",
- // })
- // .done(function (msg) {
- // console.log(msg);
- // });
- // }
- // get_data();
- // });
- // console.log(location.href);
- $(document).ready(function () {
- url = location.search;
- getSearch = url.split("?")
- console.log(getSearch[0]);
- console.log(getSearch[1]);
- var userid=getSearch[1];
- function get_data() {
- $.ajax({
- method: "GET",
- url: "https://api.ptt.cx:8228/receive/" + userid + "",
- dataType: "json",
- })
- .done(function (msg) {
- console.log(msg);
- console.log(msg.base)
- var Qrcodeimg = '';
- var useraddress = '';
- Qrcodeimg += '\
- <img src="data:image/png;base64,'+ msg.base + '" alt="">\
- ';
- useraddress += '\
- '+ msg.useraddress + '\
- ';
- $('#Qrcode').html(Qrcodeimg);
- $('#copy').html(useraddress);
- });
- }
- get_data();
- });
- function copyEvent(id) {
- var str = document.getElementById(id);
- window.getSelection().selectAllChildren(str);
- document.execCommand("Copy")
- toastr.options = {
- // 參數設定[註1]
- "closeButton": false, // 顯示關閉按鈕
- "debug": false, // 除錯
- "newestOnTop": false, // 最新一筆顯示在最上面
- "progressBar": false, // 顯示隱藏時間進度條
- "positionClass": "toast-top-center", // 位置的類別
- "preventDuplicates": false, // 隱藏重覆訊息
- "onclick": null, // 當點選提示訊息時,則執行此函式
- "showDuration": "300", // 顯示時間(單位: 毫秒)
- "hideDuration": "1000", // 隱藏時間(單位: 毫秒)
- "timeOut": "1000", // 當超過此設定時間時,則隱藏提示訊息(單位: 毫秒)
- "extendedTimeOut": "1000", // 當使用者觸碰到提示訊息時,離開後超過此設定時間則隱藏提示訊息(單位: 毫秒)
- "showEasing": "swing", // 顯示動畫時間曲線
- "hideEasing": "linear", // 隱藏動畫時間曲線
- "showMethod": "fadeIn", // 顯示動畫效果
- "hideMethod": "fadeOut" // 隱藏動畫效果
- }
- toastr.success("複製成功");
- }
|