|
@@ -5,6 +5,7 @@ import 'liveConsultation.m.dart';
|
|
|
enum LoginStateEnum {
|
|
|
Succeed,
|
|
|
PasswordIncorrect,
|
|
|
+ SignOrLoginFail,
|
|
|
}
|
|
|
|
|
|
class LoginResult {
|
|
@@ -13,6 +14,7 @@ class LoginResult {
|
|
|
int? lockRemainingTimes;
|
|
|
bool passwordExpired;
|
|
|
String? accountName;
|
|
|
+ String? openId;
|
|
|
|
|
|
LoginResult({
|
|
|
this.loginState = LoginStateEnum.Succeed,
|
|
@@ -20,6 +22,7 @@ class LoginResult {
|
|
|
this.lockRemainingTimes,
|
|
|
this.passwordExpired = false,
|
|
|
this.accountName,
|
|
|
+ this.openId,
|
|
|
});
|
|
|
|
|
|
factory LoginResult.fromJson(Map<String, dynamic> map) {
|
|
@@ -29,6 +32,7 @@ class LoginResult {
|
|
|
lockRemainingTimes: map['LockRemainingTimes'],
|
|
|
passwordExpired: map['PasswordExpired'],
|
|
|
accountName: map['AccountName'],
|
|
|
+ openId: map['OpenId'],
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -45,6 +49,9 @@ class LoginResult {
|
|
|
if (accountName != null) {
|
|
|
map['AccountName'] = accountName;
|
|
|
}
|
|
|
+ if (openId != null) {
|
|
|
+ map['OpenId'] = openId;
|
|
|
+ }
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -129,13 +136,19 @@ class CommonSignUpRequest {
|
|
|
String? anyAccount;
|
|
|
String? anyCode;
|
|
|
String? password;
|
|
|
+ String? openId;
|
|
|
Map<String,String>? headerMap;
|
|
|
+ Platform platform;
|
|
|
+ String? wXPhoneAnyCode;
|
|
|
|
|
|
CommonSignUpRequest({
|
|
|
this.anyAccount,
|
|
|
this.anyCode,
|
|
|
this.password,
|
|
|
+ this.openId,
|
|
|
this.headerMap,
|
|
|
+ this.platform = Platform.Windows,
|
|
|
+ this.wXPhoneAnyCode,
|
|
|
});
|
|
|
|
|
|
factory CommonSignUpRequest.fromJson(Map<String, dynamic> map) {
|
|
@@ -143,7 +156,10 @@ class CommonSignUpRequest {
|
|
|
anyAccount: map['AnyAccount'],
|
|
|
anyCode: map['AnyCode'],
|
|
|
password: map['Password'],
|
|
|
+ openId: map['OpenId'],
|
|
|
headerMap: map['HeaderMap']?.cast<String,String>(),
|
|
|
+ platform: Platform.values.firstWhere((e) => e.index == map['Platform']),
|
|
|
+ wXPhoneAnyCode: map['WXPhoneAnyCode'],
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -158,9 +174,16 @@ class CommonSignUpRequest {
|
|
|
if (password != null) {
|
|
|
map['Password'] = password;
|
|
|
}
|
|
|
+ if (openId != null) {
|
|
|
+ map['OpenId'] = openId;
|
|
|
+ }
|
|
|
if (headerMap != null) {
|
|
|
map['HeaderMap'] = headerMap;
|
|
|
}
|
|
|
+ map['Platform'] = platform.index;
|
|
|
+ if (wXPhoneAnyCode != null) {
|
|
|
+ map['WXPhoneAnyCode'] = wXPhoneAnyCode;
|
|
|
+ }
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -371,12 +394,18 @@ class ModifyPasswordRequest extends CommonSignUpRequest{
|
|
|
String? anyAccount,
|
|
|
String? anyCode,
|
|
|
String? password,
|
|
|
+ String? openId,
|
|
|
Map<String,String>? headerMap,
|
|
|
+ Platform platform = Platform.Windows,
|
|
|
+ String? wXPhoneAnyCode,
|
|
|
}) : super(
|
|
|
anyAccount: anyAccount,
|
|
|
anyCode: anyCode,
|
|
|
password: password,
|
|
|
+ openId: openId,
|
|
|
headerMap: headerMap,
|
|
|
+ platform: platform,
|
|
|
+ wXPhoneAnyCode: wXPhoneAnyCode,
|
|
|
);
|
|
|
|
|
|
factory ModifyPasswordRequest.fromJson(Map<String, dynamic> map) {
|
|
@@ -386,7 +415,10 @@ class ModifyPasswordRequest extends CommonSignUpRequest{
|
|
|
anyAccount: map['AnyAccount'],
|
|
|
anyCode: map['AnyCode'],
|
|
|
password: map['Password'],
|
|
|
+ openId: map['OpenId'],
|
|
|
headerMap: map['HeaderMap']?.cast<String,String>(),
|
|
|
+ platform: Platform.values.firstWhere((e) => e.index == map['Platform']),
|
|
|
+ wXPhoneAnyCode: map['WXPhoneAnyCode'],
|
|
|
);
|
|
|
}
|
|
|
|