获取登陆信息

来源:互联网 发布:mac 的破折号 编辑:程序博客网 时间:2024/06/16 11:52
function getUserInfo(xq) {    //$.ajax({    //    url: global_ajaxdomain + 'synchronizememinfo.do',    //    type: "get",    //    async: false,    //    cache: false,    //    dataType: "Json",    //    error: function (data) { alert('登录失败,错误信息:' + data.statusText + "|" + data.responseText); },    //    success: function (data) {    //        if (data.rc == "0") { }    //        else {    //            return false;    //        }    //    }    //});    $.ajax({        url: global_ajaxdomain + 'getusername.do',        type: "get",        async: false,        cache: false,        dataType: "Json",        error: function (data) { alert('登录失败,错误信息:' + data.statusText + "|" + data.responseText); },        success: function (data) {            if (data != null && data.username != undefined && data.rc == "0") {                addCookie(global_loginusername, data.username, 30);                addCookie(global_loginlenovoid, passport.cookie.lenovoId, 30);                addCookie('usertype', data.usertype, 30);                window.location.reload();            }        }    });    //if (xq != 'fromxq')    //    window.location.reload();}
0 0
原创粉丝点击