index.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // url生成二维码
  2. var qrcode_list = new QRCode(document.getElementById("qrcode"), {
  3. width: 100,
  4. height: 100
  5. });
  6. $(".code_url").click(function () {
  7. var p_text = $(this).find("#code_url").text();
  8. var p_title = $(this).find("#code_title").text();
  9. var p_page = $(this).find("#download-page").text();
  10. qrcode_list.makeCode(p_page);
  11. $('.az_hover a').attr('href', p_text);
  12. $('.download_popup p').html(p_title);
  13. });
  14. $(".public_nav li").removeClass('current_page').eq(1).addClass('current_page')
  15. // 判断是否有游戏
  16. var b = $(".strip").text();
  17. if (b == 0) {
  18. $(".page").hide();
  19. $(".no_content").show();
  20. } else {
  21. $(".page").show();
  22. $(".no_content").hide();
  23. }
  24. function searchGame(obj,id){
  25. var url = "/game/";
  26. $('#'+obj).val(id);
  27. var gametype = parseInt($('#J_gametype').val());
  28. var gamesubject = parseInt($('#J_gamesubject').val());
  29. if(isNaN(gametype)) gametype = 0;
  30. if(isNaN(gamesubject)) gamesubject = 0;
  31. location.href=url+gametype+'/'+gamesubject;
  32. }