|
|
@ -50,14 +50,11 @@ void Page_login::OnPageLoad() { |
|
|
|
UIS->setVal(PAGE, OBJ(cUsrName), getCfgStr((config_index_t)(kusr_name0))); |
|
|
|
|
|
|
|
if (!UIS->isFromPopWin()) { |
|
|
|
memset(txtPasswdCache, 0, sizeof(txtPasswdCache)); |
|
|
|
UIS->setVal(PAGE, OBJ(txtPasswd), ""); |
|
|
|
} |
|
|
|
|
|
|
|
UIS->setVal(PAGE, OBJ(txtPasswd), txtPasswdCache); |
|
|
|
} |
|
|
|
void Page_login::OnInputFieldContentChange(uint8_t bid, const char* text) { |
|
|
|
if (bid == OBJ(txtPasswd)) { |
|
|
|
strncpy(txtPasswdCache, text, sizeof(txtPasswdCache)); |
|
|
|
UIS->setVal(PAGE, bid, text); |
|
|
|
UIS->virtualClick(PAGE, OBJ(blogin), 0); // 触发一次登录按钮虚拟点击事件
|
|
|
|
} |
|
|
@ -87,8 +84,8 @@ void Page_login::OnLoginButtonClick(uint8_t bid, const char* userName, const cha |
|
|
|
ZLOGI(TAG, "%s login success ", userName); |
|
|
|
GSM->setLogin(false, userName); |
|
|
|
} |
|
|
|
|
|
|
|
UIS->chpage(pg_main); |
|
|
|
UIS->setVal(PAGE, OBJ(txtPasswd), ""); |
|
|
|
GSM->setMenuPage(GSM->isAdmin() ? pg_menuAdmin2 : pg_menuUsr); |
|
|
|
return; |
|
|
|
} |