index.w 页面中定义好 shellImp 单页应用,
在index.w中contents组件的 content 删除掉,(保证contents下没有content,不要静态主主页,页面全部使用js动态调整)
代码实现代码思路如下
Model.prototype.modelLoad = function(event){
var page = window.location.href.split('#!')[1]
if(page){
justep.Shell.showPage(page);
}else{
justep.Shell.showPage('main');
}
};
判断URL中是否有指定页面,如果有就直接跳转过去,如果没有就跳转到主页mian.w
评一波