ACE amidn 模板+ThinkPHP 实现ajax加载

浏览:6585 发布日期:2014/12/24 分类:发布项目
项目描述:现有的系统是用thinkphp3.1.3 开发的
现在在结合bootstrap模板 用的是ace admin1.3.2 模板
现在基本上已经实现 就是菜单操作是通过iframe来实现的 希望实现用过ajax加载实现
自己研究了一下 应该是需要修改这段代码    function enableAjax() {
        //Load content via ajax
        if($.fn.ace_ajax) {
           $('[data-ajax-content=true]').ace_ajax({
             'close_active': true,
             
             'content_url': function(hash) {
                //***NOTE***
                //this is for Ace demo only, you should change it to return a valid URL
                //please refer to documentation for more info

                if( !hash.match(/^page\//) ) return false;
                var path = document.location.pathname;

                //for example in Ace HTML demo version we convert /ajax/ajax.html#page/gallery to > /ajax/gallery.html and load it
                if(path.match(/(\/ajax\/)(ajax\.html)?/))

                //for example in Ace PHP demo version we convert "ajax.php#page/dashboard" to "ajax.php?page=dashboard" and load it
                return path + "?" + hash.replace(/\//, "=");
              },
              
              'default_url': '/index/welcome'//default hash
           })
        }
    }
薪 酬:100

完成时间:1天

联系电话:[phone]在此填写号码[/phone]

联系邮箱:[email]在此填写邮箱[/email]

其他信息:QQ80287518
最佳答案
评论( 相关
后面还有条评论,点击查看>>