/** 静态页面 **/
$(".dengluqian").hide();
$(".dengluhou").hide();
var top_count = 2;
try {
    top_count = $("script:last").attr("src").split('?')[1];
} catch (e) {

}

$(document).ready(function () {
    if (typeof top_count == "undefined") {
        top_count = 2;
    }
    $(".dengluqian").hide().css({ "padding": "0px", "margin": "0px" });
    $(".dengluhou").hide().css({ "padding": "0px", "margin": "0px" });
    $.ajax({
        url: "/api/remote/staticlogin.ashx?m=" + Math.random(),
        success: function (jon) {
            jon = jon.replace('"', "").replace('"', "");
            if (jon == "-1") {
                $(".dengluqian").show();
                return;
            }
            $(".dengluhou").show();
            var crc1 = jon.split('&');
            var uid = crc1[0];
            var uname = crc1[1];
            $("#username").html(uname)
            $("#userface").attr("src", "/upload/userface/user_face" + uid + ".jpg");
            /*********  最近登录过的游戏   *****************************************************/
            jQuery.ajax({
                url: "/api/remote/gameserver.ashx?top=" + top_count + "&uid=" + uid,
                type: "GET",
                dataType: "jsonp",
                jsonp: 'callback',
                error: function (i, k, l) { },
                success: function (d) {
                    var _html = "";
                    $(d).each(function (i, j) {

                        _html += '<a href="/play/' + j.Serverid + '.html" target="_blank">' + j.GameName + ' [' + j.ServerName + ']</a>';

                    });
                    $("#serversss").html(_html);
                }
            });
        }
    })
})
function qiandao() {
    jQuery.ajax({
        url: "/api/qiandao.ashx",
        type: "POST",
        data: "",
        success: function (msg) {
            alert(msg)
        }
    });

}