ui模块优化 全部navigationmanager管理
实现pastgirllistpanel逻辑 完善图集
This commit is contained in:
@@ -53,7 +53,6 @@ export class ThemePanel extends li_BaseView {
|
||||
cache: ThemeItem[] = [];
|
||||
|
||||
// 子页面管理
|
||||
private listPanel: GirlListPanel = null;
|
||||
|
||||
// 加载状态保护
|
||||
private isLoading: boolean = false;
|
||||
@@ -209,7 +208,7 @@ export class ThemePanel extends li_BaseView {
|
||||
for (let id of themeIds) {
|
||||
let newNode = instantiate(this.itemInst.node);
|
||||
let item = newNode.getComponent(ThemeItem);
|
||||
item.refresh(id, this);
|
||||
item.refresh(id, this.node);
|
||||
newNode.active = true;
|
||||
this.cache.push(item);
|
||||
this.content.addChild(newNode);
|
||||
@@ -320,17 +319,11 @@ export class ThemePanel extends li_BaseView {
|
||||
} else {
|
||||
//未解锁
|
||||
|
||||
NavigationManager.Instance.openSubPanel("GirlListPopupPanel", this.node, {
|
||||
NavigationManager.Instance.openPopupPanel("GirlListPopupPanel", {
|
||||
base: this,
|
||||
category: girlData.getGrilCategoryById(this.recId),
|
||||
id: this.recId,
|
||||
});
|
||||
|
||||
// ViewManager.I.openBundlesPopupView("GirlListPopupPanel", {
|
||||
// base: this,
|
||||
// category: girlData.getGrilCategoryById(this.recId),
|
||||
// id: this.recId,
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,43 +387,11 @@ export class ThemePanel extends li_BaseView {
|
||||
}
|
||||
}
|
||||
|
||||
public getChildPanel(): GirlListPanel {
|
||||
if (this.listPanel) return this.listPanel;
|
||||
return null;
|
||||
}
|
||||
public setChildPanel(panel: GirlListPanel) {
|
||||
this.listPanel = panel;
|
||||
}
|
||||
/**
|
||||
* 隐藏子页面
|
||||
*/
|
||||
public hideChildPanel(): void {
|
||||
if (this.listPanel) {
|
||||
console.log("[ThemePanel] Closing child panel");
|
||||
if (this.listPanel.hide) {
|
||||
this.listPanel.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 关闭子页面
|
||||
*/
|
||||
public clostChildPanel(): void {
|
||||
if (this.listPanel) {
|
||||
console.log("[ThemePanel] Closing child panel");
|
||||
if (this.listPanel.close) {
|
||||
this.listPanel.close();
|
||||
}
|
||||
this.listPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面被隐藏时调用
|
||||
*/
|
||||
public onHide(): void {
|
||||
console.log("[ThemePanel] onHide called");
|
||||
this.hideChildPanel();
|
||||
this.cancelCurrentOperation();
|
||||
}
|
||||
|
||||
@@ -451,9 +412,6 @@ export class ThemePanel extends li_BaseView {
|
||||
// 取消当前操作
|
||||
this.cancelCurrentOperation();
|
||||
|
||||
// 关闭子页面
|
||||
this.clostChildPanel();
|
||||
|
||||
// 清理缓存
|
||||
this.clearCache();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user