|

楼主 |
发表于 2017-10-25 14:48:42
|
显示全部楼层
本帖最后由 zhoubincibn 于 2017-10-25 16:55 编辑
登录 login.w 跳转代码:
justep.Util.hint("登录成功,3秒后自动跳转!");
setTimeout(function() {
justep.Shell.showPage("main");
// 我希望跳转的是 index_user 页面内容,但是 index_user 属于index_main 框架子页面,所以就不显示最下方导航按钮。
// 若直接写 justep.Shell.showPage("index_user"); 数据可以重新加载,正常;
// 难道要这样写 justep.Shell.showPage(require.toUrl('./index_main.w#!userContent')); 实际并没有执行。 跳转后,地址栏变成:http://localhost:8080/x5/UI2/v_/shtv/index.w?device=m#!($model/UI2/v_/shtv/index_main.w#!userContent)//(#!newsContent) 注意最后面,如何能让默认的第一个 newContent变成 userContent,具体写法?
}, 3000);
我虽然这样写,可以解决问题,但是觉得傻傻的 window.location.href = require.toUrl('./index.w?device=m#!main//(#!userContent)'); 相当于路由了3次,体验太不好了。
index.w代码:
var Model = function() {
this.callParent();
var shellImpl = new ShellImpl(this, {
"contentsXid" : "pages",
"pageMappings" : {
"index" : {
url : require.toUrl('./index.w')
},
"main" : {
url : require.toUrl('./index_main.w')
},
"list" : {
url : require.toUrl('./list.w')
},
"detail" : {
url : require.toUrl('./detail.w')
},
"index_user" : {
url : require.toUrl('./index_user.w')
}
}
});
};
index_main页面并没有针对 index-user做任何属性设定和代码控制。
|
|