| 
					
				 | 
			
			
				@@ -36,6 +36,7 @@ $(document).ready(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let msgLen = Object.keys(msg).length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log(msgLen) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       var collectcontent = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       for (var i = 0; i < msgLen; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         collectcontent += '\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div class="collectcontent col">\ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -65,8 +66,10 @@ $(document).ready(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </label>\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       $('.sec05-moblie-container').html(collectcontent); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -79,10 +82,13 @@ $(document).on("click", ".nftmall", function (event) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $(".select").siblings().removeClass('select'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 $(document).on("click", ".close", function (event) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // $(this).siblings('.collectcard').removeClass('select');  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $(".buybox").hide(500); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $(".nftmall").removeClass("select"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  $(".nftname").prop( "checked", false ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 $.fn.serializeObject = function () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -136,7 +142,37 @@ $(".collect-send").submit(function (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+$(".nft-buy").submit(function (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  /*	var formRef = $('#form1').serializeArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var jsonString = JSON.stringify(formRef);*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  var jsonInfo = $('.nft-buy').serializeObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  var jsonString = JSON.stringify(jsonInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  console.log(jsonString), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      type: 'POST', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      url: 'https://api.ptt.cx:8228/buy', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      data: jsonString, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      dataType: 'json', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      success: function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log('送出成功: ' + 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; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 購買頁面 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 $(document).ready(function () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -146,7 +182,7 @@ $(document).ready(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     method: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     url: "https://api.ptt.cx:8228/shop/" + collectuserid + "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // url: "https://api.ptt.cx:8228/shop/Uf161c92b16f84357987a78c2b4b47719", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    url: "https://api.ptt.cx:8228/shop/Uf161c92b16f84357987a78c2b4b47719", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .done(function (msg) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -155,10 +191,11 @@ $(document).ready(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let msgLen = Object.keys(msg).length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log(msgLen); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       var nftmall = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      var buybox=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       for (var i = 0; i < msgLen; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         nftmall += '\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div class="nftmall col">\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <input style="display: none;" type="checkbox" value="'+ msg[i].id + '" name="nftidval" class="nftname" id="' + msg[i].id + '">\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <input style="display:none" type="checkbox" value="'+ msg[i].id + '" name="nftid" class="nftname" id="' + msg[i].id + '">\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <label for="'+ msg[i].id + '">\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div class="collectcard card h-100">\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <a target="_blank">\ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -184,48 +221,59 @@ $(document).ready(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </label>\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      $('.sec06-nft-mall').html(nftmall); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      buybox+='\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="p-2">\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <input style="border-radius: 10px; border:none;" class="p-2 w-100 mb-3" type="text" name="userid" value="' + collectuserid + '" placeholder="請輸入您的userid" required>\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <div class="text-end px-2">\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <p class="text-start text-white mb-2">※一次只能購買一則NFT收藏品</p>\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <button type="button" style="border:1px solid #fff; border-radius: 30px;" class="close btn text-white px-3">取消</button>\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <input style="border-radius: 30px; background:#fff; border: none;" class="send-btn px-3 ms-1 py-2" type="submit" value="購買">\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </div>\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div>\ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </div>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      $('.sec06-nft-mall').html(nftmall); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      $('.buybox').html(buybox); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 購買建 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-$(".nft-buy").submit(function (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  /*	var formRef = $('#form1').serializeArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var jsonString = JSON.stringify(formRef);*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  var jsonInfo = $('.nft-buy').serializeObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  var jsonString = JSON.stringify(jsonInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  console.log(jsonString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  let k = jsonInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  let nftproduct = k.nftidval; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  console.log(nftproduct); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// $(".nft-buy").submit(function (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   /*	var formRef = $('#form1').serializeArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     var jsonString = JSON.stringify(formRef);*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   var jsonInfo = $('.nft-buy').serializeObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   var jsonString = JSON.stringify(jsonInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   console.log(jsonString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   let k = jsonInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   let nftproduct = k.nftidval; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   console.log(nftproduct); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    type: 'GET', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    url: "https://api.ptt.cx:8228/buy/" + collectuserid + "/" + nftproduct + "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    data: jsonString, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    dataType: 'json', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    success: function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      console.log('購買成功: ' + 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; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     type: 'GET', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     url: "https://api.ptt.cx:8228/buy/" + collectuserid + "/" + nftproduct + "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     data: jsonString, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     dataType: 'json', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     success: function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//       console.log('購買成功: ' + 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; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // $(document).ready(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //   function get_data(){ 
			 |