|
|
@ -14,7 +14,7 @@ class IPageProcesser { |
|
|
|
public: |
|
|
|
virtual void initialize() { |
|
|
|
UIS->regOnUsrEventCb([this](tjc::tjc_usr_event_t* event) { |
|
|
|
if (event->pid != getPageNum()) { |
|
|
|
if (isBelongThisPage(event->pid)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (event->eventId == tjc::kpt_sys_event_page_id) { |
|
|
@ -34,7 +34,7 @@ class IPageProcesser { |
|
|
|
}); |
|
|
|
|
|
|
|
AppEventBus::ins()->regOnEvent([this](AppEvent_t* event) { |
|
|
|
if (UIS->getNowPage() != getPageNum()) { |
|
|
|
if (isBelongThisPage(UIS->getNowPage())) { |
|
|
|
return; |
|
|
|
} |
|
|
|
OnAppEvent(event); |
|
|
@ -42,7 +42,7 @@ class IPageProcesser { |
|
|
|
} |
|
|
|
|
|
|
|
private: |
|
|
|
virtual int32_t getPageNum() = 0; |
|
|
|
virtual bool isBelongThisPage(int page) = 0; |
|
|
|
|
|
|
|
virtual void OnPageLoad() { return; }; |
|
|
|
virtual void OnInputFieldContentChange(uint8_t bid, const char* text) { return; }; |
|
|
|