|
发表于 2016-7-30 08:18:04
|
显示全部楼层
你对案例不认真研究的。。。main页面会注册一些事件,然后在子页面调用
main
// 添加事件
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);
};
这是子页面的
justep.Shell.fireEvent("onShoppingContent",{});
justep.Shell.showMainPage();
|
|