个人信息页入版

This commit is contained in:
2025-09-16 11:58:15 +08:00
parent 5a5014b024
commit aa5b95f833
109 changed files with 11137 additions and 12534 deletions
@@ -6,6 +6,7 @@ import li_EventManager from "../../Main/Common/li_EventManager";
import { InnerMsgCode } from "../../Main/Config/InnerMsgCode";
import { ThemePanel } from "../ui/panels/ThemePanel";
import { GirlListPanel } from "../ui/panels/GirlListPanel";
import li_BaseView from "../../Main/Common/li_BaseView";
/**
* 页面过渡动画类型枚举
@@ -23,7 +24,7 @@ export enum PanelType {
THEME = "ThemePanel",
GIRL_DETAIL = "GirlDetailPanel",
CHAT = "ChatPanel",
SETTING = "SettingPanel",
PERSONAL = "PersonalPanel",
}
/**
@@ -50,7 +51,8 @@ export class NavigationManager {
// NavigationPanel相关属性
private navigationPanel: any = null; // NavigationPanel实例引用
private currentActivePanel: PanelType = PanelType.THEME;
private currentActivePanelType: PanelType = PanelType.THEME;
private currentActivePanel: Node;
private panelCache: Map<PanelType, Node> = new Map(); // 面板缓存
private currentVisiblePanel: Node = null;
@@ -117,7 +119,7 @@ export class NavigationManager {
* @param panelType 目标面板类型
*/
public switchToPanel(panelType: PanelType, force: boolean = false): void {
if (this.currentActivePanel === panelType && !force) {
if (this.currentActivePanelType === panelType && !force) {
if (panelType === PanelType.THEME) {
this.girlListPanel.hide();
}
@@ -137,7 +139,7 @@ export class NavigationManager {
this.navigationPanel.showLoading?.();
// 计算动画方向
const currentIndex = this.getPanelIndex(this.currentActivePanel);
const currentIndex = this.getPanelIndex(this.currentActivePanelType);
const targetIndex = this.getPanelIndex(panelType);
const isMovingRight = currentIndex < targetIndex;
@@ -149,19 +151,40 @@ export class NavigationManager {
// 加载并显示目标面板
this.loadOrGetPanel(panelType, (panel: Node) => {
this.currentActivePanel = panelType;
this.currentActivePanelType = panelType;
this.currentVisiblePanel = panel;
if (this.subPanelDic.has(this.currentActivePanel)) {
//如果有子页面,关闭掉
let subs = this.subPanelDic.get(this.currentActivePanel);
subs.forEach((n) => {
n.getComponent(li_BaseView).close();
});
this.subPanelDic.delete(this.currentActivePanel);
}
// 更新NavigationPanel按钮状态
this.navigationPanel.updateButtonStates?.(panelType);
// 显示面板
this.showPanelWithAnimation(panel, showDirection, () => {
this.currentActivePanel = panel;
this.navigationPanel.hideLoading?.();
});
});
}
private subPanelDic: Map<Node, Node[]> = new Map();
public openSubPanel(panelName: string, basePanel: Node, data: any = null) {
const callback = (n: Node) => {
if (!this.subPanelDic.has(basePanel)) {
this.subPanelDic.set(basePanel, []);
}
this.subPanelDic.get(basePanel).push(n);
};
ViewManager.I.openBundlesView(panelName, data, callback);
}
/**
* 获取面板索引(用于动画方向计算)
*/
@@ -173,7 +196,7 @@ export class NavigationManager {
return 1;
case PanelType.CHAT:
return 2;
case PanelType.SETTING:
case PanelType.PERSONAL:
return 3;
default:
return 0;
@@ -257,7 +280,7 @@ export class NavigationManager {
}
// 如果当前是ThemePanel,需要同时处理可能的子页面(GirlListPanel
if (this.currentActivePanel === PanelType.THEME) {
if (this.currentActivePanelType === PanelType.THEME) {
// 查找并隐藏GirlListPanel子页面
this.hideThemePanelChildren(direction);
@@ -373,7 +396,7 @@ export class NavigationManager {
* 获取当前激活的面板类型
*/
public getCurrentActivePanel(): PanelType {
return this.currentActivePanel;
return this.currentActivePanelType;
}
/**