问题修改
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user