feat: 支持 PK 数据以及详情页面
This commit is contained in:
@@ -66,6 +66,9 @@ export class PageWriteLevels extends BaseView {
|
||||
@property({ type: Node, tooltip: '分享标题输入框节点' })
|
||||
shareTitleEditBox: Node | null = null;
|
||||
|
||||
@property({ type: Node, tooltip: '挑战数据按钮节点' })
|
||||
dataBtn: Node | null = null;
|
||||
|
||||
private _selectedIndices: Set<number> = new Set();
|
||||
private _currentPage: number = 0;
|
||||
private _totalPages: number = 0;
|
||||
@@ -99,6 +102,9 @@ export class PageWriteLevels extends BaseView {
|
||||
if (this.completeBtn) {
|
||||
this.completeBtn.on(Button.EventType.CLICK, this._onCompleteClick, this);
|
||||
}
|
||||
if (this.dataBtn) {
|
||||
this.dataBtn.on(Button.EventType.CLICK, this._onDataClick, this);
|
||||
}
|
||||
}
|
||||
|
||||
private _initScrollView(): void {
|
||||
@@ -465,6 +471,10 @@ export class PageWriteLevels extends BaseView {
|
||||
ViewManager.instance.back();
|
||||
}
|
||||
|
||||
private _onDataClick(): void {
|
||||
ViewManager.instance.open('PagePKData');
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验是否已选满关卡,未满则 Toast 提示
|
||||
* @returns true 表示校验通过
|
||||
@@ -555,6 +565,9 @@ export class PageWriteLevels extends BaseView {
|
||||
if (this.completeBtn) {
|
||||
this.completeBtn.off(Button.EventType.CLICK, this._onCompleteClick, this);
|
||||
}
|
||||
if (this.dataBtn) {
|
||||
this.dataBtn.off(Button.EventType.CLICK, this._onDataClick, this);
|
||||
}
|
||||
if (this.scrollView) {
|
||||
this.scrollView.off(Node.EventType.TOUCH_START, this._onTouchStart, this);
|
||||
this.scrollView.off(Node.EventType.TOUCH_END, this._onTouchEnd, this);
|
||||
|
||||
Reference in New Issue
Block a user