cloud-manage-new/src/main/resources/templates/minimanage/Scripts/js/index.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


(function () {
    var publishCommon = {
        pageQueryParam: null,
        dtlNewsList: null
    };
    function bindControls() {
         LoadTree();
        GetAdminInfo();
    }
    //初始化用户权限树
    function LoadTree() {
        var leftTree = mini.get("leftTree");
        var url=getUrl()+"userCenter/moudle/getMiniUiMoudle?access_token="+auth.access_token;
        leftTree.setUrl(url);
    }
    //页面跳转
    function Redirect() {
        $.ajax({
            url: pageJs.Url.RedirectUrl,
            success: function (text) {
                alert(text);
            }
        });
    }
    //获取登录用户详细信息
    function GetAdminInfo() {
        $.ajax({
            url: getUrl()+"userCenter/moudle/getMiniUiAdminInfo",
            type: "Post",
            dataType : 'json',
            contentType : 'application/json;charset=UTF-8', //contentType很重要
            // cache: false,
            async: false,
            beforeSend:function(xhr){
                if(auth != null){
                    xhr.setRequestHeader("Authorization", auth.token_type + ' ' + auth.access_token);
                } else {
                    return false;
                }
            },
            success: function (result) {
                if (result.code==-1) {
                    window.location.href = getUrl()+"login.html";
                }
                else {
                    var path = result.logindata.picture;
                    if (path != null && path != "") {
                        var image = "<img src='" + path + "'>";
                        $("#image").html(image);
                    }
                    else
                    {
                        var path="../../../manage/img/logo1.png";
                        var image = "<img src='" + path + "'>";
                        $("#image").html(image);
                    }
                    // var leftTree = mini.get("leftTree");
                    // leftTree.setData(result.menus);
                    $("#userName").html(" 登录人:"+result.userName);
后面还有 52 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。