var qrcode = new QRCode(document.getElementById("qrcode"), { width: 100, height: 100 }); // url生成二维码 if($(".az_code_right").length>0){ var qrcode_title = new QRCode(document.getElementById("qrcode_title"), { width : 100, height : 100 }); } $(function () { var p_text1 = $("#code_url").text(); if($(".az_code_right").length>0){ qrcode_title.makeCode(p_text1); } $(".public_nav li").removeClass('current_page').eq(1).addClass('current_page'); $("#J_rank_list").load('/Layout/gameRankList'); }); // 安卓下载按钮 $(".az_code_right .az_ed_download").hover(function () { $(".az_ed_download img").attr("src", "/static/images/home/az-white.png"); }, function () { $(".az_ed_download img").attr("src", "/static/images/home/SVG-07.png"); }); $(".az_no_link .az_no_download").hover(function () { $(".az_no_download img").attr("src", "/static/images/home/az-white.png"); }, function () { $(".az_no_download img").attr("src", "/static/images/home/SVG-19.png"); }); $(".az_no_download").click(function () { $(".warp_no_download_popup").show(); }) // 手游排行控件显示隐藏 $(function () { $('.rank_list>div').eq(0).find('.big').show() $('.rank_list>div').eq(0).find('.small').hide() $('.rank_list').hover(function () { $('.rank_list>div').hover(function () { $(this).find('.big').show().parent().siblings().find('.big').hide(); $(this).find('.small').hide().parent().siblings().find('.small').show(); }); }); }) var AjaxTestPage = function(page){ setTimeout(function(){ $(".pagination li:first-child a").html('上一页'); $(".pagination li:first-child span").html('上一页'); $(".pagination li:last-child a").html('下一页'); $(".pagination li:last-child span").html('下一页'); $(".disabled").each(function(){ var a = $(this).text(); if(a="..."){ $(this).find("span").css("cssText", "background:#fff;color:#494949 !important;border:none;cursor: context-menu;"); } }); },200); $.ajax({ url:'/Game/getGameServer' + '?game_id='+game_id+'&type=1&page='+page, type:'post', dataType:'json', data: {page:page}, success:function(data){ var html = ''; $.each(data.list.data, function(i,row){ html += ''; }); html += '
' + data.page + '
'+ data.list.total +'条 / '+ data.list.last_page + '页 记录
'; $("#open_test").html(html); } }); } var AjaxServicePage = function(page){ setTimeout(function(){ $(".pagination li:first-child a").html('上一页'); $(".pagination li:first-child span").html('上一页'); $(".pagination li:last-child a").html('下一页'); $(".pagination li:last-child span").html('下一页'); $(".disabled").each(function(){ var a = $(this).text(); if(a="..."){ $(this).find("span").css("cssText", "background:#fff;color:#494949 !important;border:none;cursor: context-menu;"); } }); },200); $.ajax({ url:'/Game/getGameServer' + '?game_id='+game_id+'&type=0&page='+page, type:'post', dataType:'json', data: {page:page}, success:function(data){ var html = ''; $.each(data.list.data, function(i,row){ html += ''; }); html += '
' + data.page + '
'+ data.list.total +'条 / '+ data.list.last_page + '页 记录
'; $("#open_service").html(html); } }); } // 预约弹窗 function kf_tip(id,kfkc){ $.ajax({ type: "POST", timeOut: 10000, url: '/service/subscribe', data: { "id": id, "type": kfkc }, async: false, success: function (res) { // console.log(res); if (res.code == 1 || res.code == 4 || res.code == 5) { $(".success").show(); $("#success_txt").text(res.msg) } else if (res.code == 2){ window.location.href = res.data; } else if (res.code == 3){ $("#bind_phone_href").attr('href',res.data); $("#bind_phone_txt").text(res.msg) $("#bind_phone_href").text("去绑定"); $(".bind_phone").show(); }/*else if (res.code == 4){ $(".order").show(); }else if (res.code == 5){ $(".overtime").show(); }*/else { alert(res.msg); } }, error: function () { layer.msg('网络错误,请刷新页面重试'); } }); }