ui修改
This commit is contained in:
@@ -6,7 +6,12 @@ import { GirlData } from "../data/GirlData";
|
||||
import LanguageUtils from "../../Main/Common/LanguageUtils";
|
||||
import ResManager from "../../Main/Manager/ResManager";
|
||||
import { EnvData } from "../data/EnvData";
|
||||
import { NavigationManager, PanelType } from "../manager/NavigationManager";
|
||||
import {
|
||||
NavigationManager,
|
||||
PanelType,
|
||||
PageTransitionType,
|
||||
} from "../manager/NavigationManager";
|
||||
import { logger } from "../../Main/Common/Logger";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("RecomandItem")
|
||||
@@ -39,7 +44,7 @@ export class RecomandItem extends Component {
|
||||
|
||||
this.chatBtn = this._nodeTab.chatBtn;
|
||||
GButton.BandClick(this.chatBtn, this.chatToHer, this);
|
||||
GButton.BandClick(this.chatBtn, this.gotoDetail, this);
|
||||
GButton.BandClick(this._nodeTab.detailBtn, this.gotoDetail, this);
|
||||
}
|
||||
|
||||
refresh(girlId: number) {
|
||||
@@ -80,16 +85,42 @@ export class RecomandItem extends Component {
|
||||
NavigationManager.Instance.setSelectedCategoryId(
|
||||
girlData.getGrilCategoryById(this.id)
|
||||
);
|
||||
NavigationManager.Instance.switchToPanel(PanelType.GIRL_DETAIL);
|
||||
|
||||
NavigationManager.Instance.switchToPanel(
|
||||
PanelType.PAST_GIRL_LIST,
|
||||
false,
|
||||
(base) => {
|
||||
const chatData = { girlId: this.id, base: base };
|
||||
NavigationManager.Instance.openSubPanel("ChatPanel", base, chatData, {
|
||||
openAnimation: PageTransitionType.SLIDE_LEFT,
|
||||
closeAnimation: PageTransitionType.SLIDE_RIGHT,
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
gotoDetail()
|
||||
{
|
||||
gotoDetail() {
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
|
||||
NavigationManager.Instance.setSelectedGirlId(this.id);
|
||||
NavigationManager.Instance.setSelectedCategoryId(
|
||||
girlData.getGrilCategoryById(this.id)
|
||||
);
|
||||
NavigationManager.Instance.switchToPanel(PanelType.GIRL_DETAIL);
|
||||
|
||||
// 以subpanel方式打开GirlDetailPanel
|
||||
const currentPanel = NavigationManager.Instance.getCurrentActivePanelNode();
|
||||
if (currentPanel) {
|
||||
NavigationManager.Instance.openSubPanel(
|
||||
"GirlDetailPanel",
|
||||
currentPanel,
|
||||
this.id,
|
||||
{
|
||||
openAnimation: PageTransitionType.SLIDE_LEFT,
|
||||
closeAnimation: PageTransitionType.SLIDE_RIGHT,
|
||||
hideBasePanel: true, // 隐藏底层panel,实现全屏显示
|
||||
}
|
||||
);
|
||||
} else {
|
||||
logger.warn("[RecomandItem] 无法获取当前激活的主页面");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user