| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- 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 += '<ul class="service_content">';
- if ( row.serverDate) {
- html += '<li class="service_date">'
- + ' <img src="/static/images/home/Assistor.png">'
- + '<p><span>'+row.serverDate+'</span></p>'
- + '</li>';
- }
- html += '<li>'
- + '<p>'+row.serverTime+'</p>'
- + '<p>'+row.serverName+'</p>'
- + '<P>';
- if (row.subscribe) {
- html += '<a class="kf_tip" onclick="kf_tip('+row.id+',\'kc\')">预约</a>';
- }
- html += '</P>'
- + '</li>'
- + '</ul>';
- });
- html += '<div class="page">' + data.page
- + '<div class="rows">共 <b>'+ data.list.total +'</b>条 / <b>'+ data.list.last_page + '</b>页 记录 </div></div>';
- $("#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 += '<ul class="service_content">';
- if ( row.serverDate) {
- html += '<li class="service_date">'
- + ' <img src="/static/images/home/Assistor.png">'
- + '<p><span>'+row.serverDate+'</span></p>'
- + '</li>';
- }
- html += '<li>'
- + '<p>'+row.serverTime+'</p>'
- + '<p>'+row.serverName+'</p>'
- + '<P>';
- if (row.subscribe) {
- html += '<a class="kf_tip" onclick="kf_tip('+row.id+',\'kf\')">预约</a>';
- }
- html += '</P>'
- + '</li>'
- + '</ul>';
- });
- html += '<div class="page">' + data.page
- + '<div class="rows">共 <b>'+ data.list.total +'</b>条 / <b>'+ data.list.last_page + '</b>页 记录 </div></div>';
- $("#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('网络错误,请刷新页面重试');
- }
- });
- }
|