|
发表于 2016-9-15 19:00:10
|
显示全部楼层
你确定在index.w中删掉了windowContainer吗?不要用这个容器来开窗口
用
this.shellImpl = new ShellImpl(this, {
contentsXid : "pages",
wingXid : "wing",
pageMappings : {
"main" : {
url : require.toUrl('./main/main.w')
},
"left" : {
url : require.toUrl('./leftMenu.w')
},
"login" : {
url : require.toUrl('./login/login.w')
}
}
});
定义窗口。
在index.w中
Model.prototype.modelLoad = function(event) {
window.storage = window.localStorage;
var v_userid = storage.getItem("userid");
if(!v_userid ){
justep.Shell.showPage("login");
}else{
justep.Shell.showPage("main");
}
justep.Shell.loadPage("left");
};
判断并打开login窗口。
在login.w的login按钮Click设置并打开main窗口
在login.w中
Model.prototype.loginBtnClick = function(event){
storage.setItem("userid","xxxxxx");
justep.Shell.showPage("main");
};
|
|