|
除了首页,其他的都是用windowContainer,但autoLoad都设置成false,可为什么还能自动加载.w页面呢?导航按钮上也没有绑定任何事件啊
- // 添加事件
- Model.prototype.modelLoad = function(event) {
- justep.Shell.on("onRestoreContent", this.onRestoreContent, this);
- justep.Shell.on("onShoppingContent", this.onShoppingContent, this);
- justep.Shell.on("onHomeContent", this.onHomeContent, this);
- };
- // 卸载事件
- Model.prototype.modelUnLoad = function(event) {
- justep.Shell.off("onRestoreContent", this.onRestoreContent);
- justep.Shell.off("onShoppingContent", this.onShoppingContent);
- justep.Shell.off("onHomeContent", this.onHomeContent);
- };
- // 返回上一次的content
- Model.prototype.onRestoreContent = function(event) {
- this.comp("contents2").to(this.lastContentXid);
- };
- // 记住当前content,切换到购物车页
- Model.prototype.onShoppingContent = function(event) {
- this.lastContentXid = this.comp("contents2").getActiveXid();
- this.comp("contents2").to("shoppingContent");
- var shoppingModel = this.comp("navContainer4").getInnerModel();
- if (shoppingModel) {
- shoppingModel.showBackBtn(true);
- }
- };
- // 切换到首页
- Model.prototype.onHomeContent = function(event) {
- this.comp("contents2").to("homeContent");
- };
复制代码 还有以上代码,添加事件都添加到哪里去了,什么情况下会触发这些事件
|
|