起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1423|回复: 4

[结贴] justep.Shell.showPage 跳转错误,求助!

[复制链接]

4

主题

14

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
发表于 2016-9-20 17:37:49 | 显示全部楼层 |阅读模式
源码:
define(function(require){
        var $ = require("jquery");
        var justep = require("$UI/system/lib/justep");
        var ShellImpl = require('$UI/system/lib/portal/shellImpl');

        var Model = function(){
                this.callParent();
                var shellImpl = new ShellImpl(this, {
                        "contentsXid" : "pages",
                        "pageMappings" : {
                                "main":{
                                        url : require.toUrl('./index_main.w')
                                },
                                "login":{
                                        url : require.toUrl('./login.w')
                                }
                        }
                });
                alert("shellImp 初始化");
                shellImpl.useDefaultExitHandler = false;
               
        };

        Model.prototype.modelLoad = function(event){
                localStorage.setItem("ifclose","false");
               
                localStorage.setItem("user_name","");
               
                var login_name=localStorage.getItem("user_name");
                if(login_name==""||login_name==null)
                {
                        justep.Shell.showPage("login");
                }
                else
                {
                        justep.Shell.showPage("main");
                }
        };

        return Model;
});
访问之后提示 cannot read property 'has' of null
单独访问index_main.w和login.w都是正常的。
谁知道怎么弄。

4

主题

14

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
 楼主| 发表于 2016-9-20 17:39:27 | 显示全部楼层
QQ截图20160920173857.png
回复 支持 反对

使用道具 举报

21

主题

88

帖子

220

积分

中级会员

Rank: 3Rank: 3

积分
220
QQ
发表于 2016-9-20 17:58:46 | 显示全部楼层
$UI/system/components/justep/contents/contents  控件的xid  和 contentsXid 不一致导致的
回复 支持 反对

使用道具 举报

4

主题

14

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
 楼主| 发表于 2016-9-20 18:59:18 | 显示全部楼层
吉乐 发表于 2016-9-20 17:58
$UI/system/components/justep/contents/contents  控件的xid  和 contentsXid 不一致导致的

确实是这样,谢谢大神!
回复 支持 反对

使用道具 举报

4

主题

14

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
 楼主| 发表于 2016-9-20 19:00:22 | 显示全部楼层
问题已经解决了,请结贴。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-8 07:27 , Processed in 0.062844 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表