问题修改

This commit is contained in:
2026-01-30 16:02:35 +08:00
parent bc99ffd691
commit 55eade54b6
6 changed files with 92 additions and 74 deletions

View File

@@ -444,12 +444,19 @@ class _LoginPageState extends State<LoginPage> with SingleTickerProviderStateMix
data: {'account': account, 'password': encryptedPassword, 'loginType': "station"},
);
if (_rememberPassword) {
await StorageService.to.saveStationCredentials(account, password);
} else {
await StorageService.to.clearStationCredentials();
if (responseData != null && responseData.data != null) {
var result = BaseModel.fromJson(responseData.data);
if (result.code == 0) {
// 登录成功,处理记住密码逻辑
if (_rememberPassword) {
await StorageService.to.saveStationCredentials(account, password);
} else {
await StorageService.to.clearStationCredentials();
}
}
}
_processLoginResponse(responseData, "station", account);
} catch (e) {
dismissLoading();
@@ -476,7 +483,6 @@ class _LoginPageState extends State<LoginPage> with SingleTickerProviderStateMix
) async {
if (responseData == null || responseData.data == null) {
dismissLoading();
showToast('登录失败');
return;
}
var result = BaseModel.fromJson(responseData.data);