|
@@ -1,116 +1,123 @@
|
|
|
import 'package:fis_i18n/types.dart';
|
|
|
|
|
|
+/// 认证模块
|
|
|
class AuthModule extends ModuleBase {
|
|
|
- AuthModule._(
|
|
|
- {required this.login,
|
|
|
- required this.signUp,
|
|
|
- required this.login4Btn,
|
|
|
- required this.signUp4Btn,
|
|
|
- required this.account,
|
|
|
- required this.password,
|
|
|
- required this.keepPwd,
|
|
|
- required this.resetPwd,
|
|
|
- required this.forgotPwd,
|
|
|
- required this.tabOfLoginByAccountPwd,
|
|
|
- required this.tabOfLoginByVerificationCode,
|
|
|
- required this.hint4AccountDouble,
|
|
|
- required this.hint4AccountTriple,
|
|
|
- required this.hint4Pwd,
|
|
|
- required this.hint4ConfirmPwd,
|
|
|
- required this.hint4VerificationCode,
|
|
|
- required this.agreeStatement,
|
|
|
- required this.privacyPolicy,
|
|
|
- required this.userAgreement,
|
|
|
- required this.sendVerificationCode,
|
|
|
- required this.resendVerificationCode,
|
|
|
- required this.sendVerificationCodeTimer,
|
|
|
- required this.signOut,
|
|
|
- required this.back4Login,
|
|
|
- required this.toast4AgreeStatement,
|
|
|
- required this.toast4AccountPwdError,
|
|
|
- required this.toast4AccountNotExist,
|
|
|
- required this.toast4AccountHasExist,
|
|
|
- required this.toast4AccountDouble,
|
|
|
- required this.toast4AccountTriple,
|
|
|
- required this.toast4VerifyCodeOverdue,
|
|
|
- required this.toast4VerifyCodeError,
|
|
|
- required this.toast4LoginFail,
|
|
|
- required this.toast4LoginSuccess,
|
|
|
- required this.toast4SignUpFail,
|
|
|
- required this.toast4SignUpSuccess,
|
|
|
- required this.toast4ResetFail,
|
|
|
- required this.toast4ResetSuccess,
|
|
|
- required this.toast4VerifyCodeSendFail,
|
|
|
- required this.toast4VerifyCodeSendSuccess,
|
|
|
- required this.toast4ConfirmPwdMatchError,
|
|
|
- required this.toast4PwdBlankError,
|
|
|
- required this.toast4PwdLengthError,
|
|
|
- required this.toast4PwdCharCombinError,
|
|
|
- required this.toast4AccountFormatError,
|
|
|
- required this.otherLoginWay});
|
|
|
+ AuthModule._({
|
|
|
+ required this.login,
|
|
|
+ required this.login4Btn,
|
|
|
+ required this.signUp,
|
|
|
+ required this.signUp4Btn,
|
|
|
+ required this.account,
|
|
|
+ required this.password,
|
|
|
+ required this.keepPwd,
|
|
|
+ required this.resetPwd,
|
|
|
+ required this.forgotPwd,
|
|
|
+ required this.tabOfLoginByAccountPwd,
|
|
|
+ required this.tabOfLoginByVerificationCode,
|
|
|
+ required this.hint4AccountDouble,
|
|
|
+ required this.hint4AccountTriple,
|
|
|
+ required this.hint4ConfirmPwd,
|
|
|
+ required this.hint4Pwd,
|
|
|
+ required this.hint4VerificationCode,
|
|
|
+ required this.agreeStatement,
|
|
|
+ required this.privacyPolicy,
|
|
|
+ required this.userAgreement,
|
|
|
+ required this.sendVerificationCode,
|
|
|
+ required this.resendVerificationCode,
|
|
|
+ required this.sendVerificationCodeTimer,
|
|
|
+ required this.signOut,
|
|
|
+ required this.back4Login,
|
|
|
+ required this.toast4AgreeStatement,
|
|
|
+ required this.toast4AccountPwdError,
|
|
|
+ required this.toast4AccountNotExist,
|
|
|
+ required this.toast4AccountHasExist,
|
|
|
+ required this.toast4AccountDouble,
|
|
|
+ required this.toast4AccountTriple,
|
|
|
+ required this.toast4VerifyCodeOverdue,
|
|
|
+ required this.toast4VerifyCodeError,
|
|
|
+ required this.toast4LoginFail,
|
|
|
+ required this.toast4LoginSuccess,
|
|
|
+ required this.toast4SignUpFail,
|
|
|
+ required this.toast4SignUpSuccess,
|
|
|
+ required this.toast4ResetFail,
|
|
|
+ required this.toast4ResetSuccess,
|
|
|
+ required this.toast4VerifyCodeSendFail,
|
|
|
+ required this.toast4VerifyCodeSendSuccess,
|
|
|
+ required this.toast4ConfirmPwdMatchError,
|
|
|
+ required this.toast4PwdBlankError,
|
|
|
+ required this.toast4PwdLengthError,
|
|
|
+ required this.toast4PwdCharCombinError,
|
|
|
+ required this.toast4AccountFormatError,
|
|
|
+ required this.otherLoginWay,
|
|
|
+ required this.logining,
|
|
|
+ required this.switching,
|
|
|
+ });
|
|
|
|
|
|
static const ModuleName = "auth";
|
|
|
|
|
|
factory AuthModule(Map<String, dynamic> map) {
|
|
|
return AuthModule._(
|
|
|
- login: map.pick('login'),
|
|
|
- signUp: map.pick('signUp'),
|
|
|
- login4Btn: map.pick('login4Btn'),
|
|
|
- signUp4Btn: map.pick('signUp4Btn'),
|
|
|
- account: map.pick("account"),
|
|
|
- password: map.pick("password"),
|
|
|
- keepPwd: map.pick("keepPwd"),
|
|
|
- resetPwd: map.pick("resetPwd"),
|
|
|
- forgotPwd: map.pick("forgotPwd"),
|
|
|
- tabOfLoginByAccountPwd: map.pick("tabOfLoginByAccountPwd"),
|
|
|
- tabOfLoginByVerificationCode: map.pick("tabOfLoginByVerificationCode"),
|
|
|
- hint4AccountDouble: map.pick("hint4AccountDouble"),
|
|
|
- hint4AccountTriple: map.pick("hint4AccountTriple"),
|
|
|
- hint4ConfirmPwd: map.pick("hint4ConfirmPwd"),
|
|
|
- hint4Pwd: map.pick("hint4Pwd"),
|
|
|
- hint4VerificationCode: map.pick("hint4VerificationCode"),
|
|
|
- agreeStatement: map.pick("agreeStatement"),
|
|
|
- privacyPolicy: map.pick("privacyPolicy"),
|
|
|
- userAgreement: map.pick("userAgreement"),
|
|
|
- sendVerificationCode: map.pick("sendVerificationCode"),
|
|
|
- resendVerificationCode: map.pick("resendVerificationCode"),
|
|
|
- sendVerificationCodeTimer: map.pick("sendVerificationCodeTimer"),
|
|
|
- signOut: map.pick("signOut"),
|
|
|
- back4Login: map.pick("back4Login"),
|
|
|
- toast4AgreeStatement: map.pick("toast4AgreeStatement"),
|
|
|
- toast4AccountPwdError: map.pick("toast4AccountPwdError"),
|
|
|
- toast4AccountNotExist: map.pick("toast4AccountNotExist"),
|
|
|
- toast4AccountHasExist: map.pick("toast4AccountHasExist"),
|
|
|
- toast4AccountDouble: map.pick("toast4AccountDouble"),
|
|
|
- toast4AccountTriple: map.pick("toast4AccountTriple"),
|
|
|
- toast4VerifyCodeOverdue: map.pick("toast4VerifyCodeOverdue"),
|
|
|
- toast4VerifyCodeError: map.pick("toast4VerifyCodeError"),
|
|
|
- toast4LoginFail: map.pick("toast4LoginFail"),
|
|
|
- toast4LoginSuccess: map.pick("toast4LoginSuccess"),
|
|
|
- toast4SignUpFail: map.pick("toast4SignUpFail"),
|
|
|
- toast4SignUpSuccess: map.pick("toast4SignUpSuccess"),
|
|
|
- toast4ResetFail: map.pick("toast4ResetFail"),
|
|
|
- toast4ResetSuccess: map.pick("toast4ResetSuccess"),
|
|
|
- toast4VerifyCodeSendFail: map.pick("toast4VerifyCodeSendFail"),
|
|
|
- toast4VerifyCodeSendSuccess: map.pick("toast4VerifyCodeSendSuccess"),
|
|
|
- toast4ConfirmPwdMatchError: map.pick("toast4ConfirmPwdMatchError"),
|
|
|
- toast4PwdBlankError: map.pick("toast4PwdBlankError"),
|
|
|
- toast4PwdLengthError: map.pick("toast4PwdLengthError"),
|
|
|
- toast4PwdCharCombinError: map.pick("toast4PwdCharCombinError"),
|
|
|
- toast4AccountFormatError: map.pick("toast4AccountFormatError"),
|
|
|
- otherLoginWay: map.pick("otherLoginWay"));
|
|
|
+ login: map.pick("login"),
|
|
|
+ login4Btn: map.pick("login4Btn"),
|
|
|
+ signUp: map.pick("signUp"),
|
|
|
+ signUp4Btn: map.pick("signUp4Btn"),
|
|
|
+ account: map.pick("account"),
|
|
|
+ password: map.pick("password"),
|
|
|
+ keepPwd: map.pick("keepPwd"),
|
|
|
+ resetPwd: map.pick("resetPwd"),
|
|
|
+ forgotPwd: map.pick("forgotPwd"),
|
|
|
+ tabOfLoginByAccountPwd: map.pick("tabOfLoginByAccountPwd"),
|
|
|
+ tabOfLoginByVerificationCode: map.pick("tabOfLoginByVerificationCode"),
|
|
|
+ hint4AccountDouble: map.pick("hint4AccountDouble"),
|
|
|
+ hint4AccountTriple: map.pick("hint4AccountTriple"),
|
|
|
+ hint4ConfirmPwd: map.pick("hint4ConfirmPwd"),
|
|
|
+ hint4Pwd: map.pick("hint4Pwd"),
|
|
|
+ hint4VerificationCode: map.pick("hint4VerificationCode"),
|
|
|
+ agreeStatement: map.pick("agreeStatement"),
|
|
|
+ privacyPolicy: map.pick("privacyPolicy"),
|
|
|
+ userAgreement: map.pick("userAgreement"),
|
|
|
+ sendVerificationCode: map.pick("sendVerificationCode"),
|
|
|
+ resendVerificationCode: map.pick("resendVerificationCode"),
|
|
|
+ sendVerificationCodeTimer: map.pick("sendVerificationCodeTimer"),
|
|
|
+ signOut: map.pick("signOut"),
|
|
|
+ back4Login: map.pick("back4Login"),
|
|
|
+ toast4AgreeStatement: map.pick("toast4AgreeStatement"),
|
|
|
+ toast4AccountPwdError: map.pick("toast4AccountPwdError"),
|
|
|
+ toast4AccountNotExist: map.pick("toast4AccountNotExist"),
|
|
|
+ toast4AccountHasExist: map.pick("toast4AccountHasExist"),
|
|
|
+ toast4AccountDouble: map.pick("toast4AccountDouble"),
|
|
|
+ toast4AccountTriple: map.pick("toast4AccountTriple"),
|
|
|
+ toast4VerifyCodeOverdue: map.pick("toast4VerifyCodeOverdue"),
|
|
|
+ toast4VerifyCodeError: map.pick("toast4VerifyCodeError"),
|
|
|
+ toast4LoginFail: map.pick("toast4LoginFail"),
|
|
|
+ toast4LoginSuccess: map.pick("toast4LoginSuccess"),
|
|
|
+ toast4SignUpFail: map.pick("toast4SignUpFail"),
|
|
|
+ toast4SignUpSuccess: map.pick("toast4SignUpSuccess"),
|
|
|
+ toast4ResetFail: map.pick("toast4ResetFail"),
|
|
|
+ toast4ResetSuccess: map.pick("toast4ResetSuccess"),
|
|
|
+ toast4VerifyCodeSendFail: map.pick("toast4VerifyCodeSendFail"),
|
|
|
+ toast4VerifyCodeSendSuccess: map.pick("toast4VerifyCodeSendSuccess"),
|
|
|
+ toast4ConfirmPwdMatchError: map.pick("toast4ConfirmPwdMatchError"),
|
|
|
+ toast4PwdBlankError: map.pick("toast4PwdBlankError"),
|
|
|
+ toast4PwdLengthError: map.pick("toast4PwdLengthError"),
|
|
|
+ toast4PwdCharCombinError: map.pick("toast4PwdCharCombinError"),
|
|
|
+ toast4AccountFormatError: map.pick("toast4AccountFormatError"),
|
|
|
+ otherLoginWay: map.pick("otherLoginWay"),
|
|
|
+ logining: map.pick("logining"),
|
|
|
+ switching: map.pick("switching"),
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
/// 登录
|
|
|
final FTrStr login;
|
|
|
|
|
|
+ /// 登 录
|
|
|
+ final FTrStr login4Btn;
|
|
|
+
|
|
|
/// 注册
|
|
|
final FTrStr signUp;
|
|
|
|
|
|
- /// 登录 for Button
|
|
|
- final FTrStr login4Btn;
|
|
|
-
|
|
|
- /// 注册 for Button
|
|
|
+ /// 注 册
|
|
|
final FTrStr signUp4Btn;
|
|
|
|
|
|
/// 账号
|
|
@@ -122,129 +129,132 @@ class AuthModule extends ModuleBase {
|
|
|
/// 记住密码
|
|
|
final FTrStr keepPwd;
|
|
|
|
|
|
+ /// 重 置
|
|
|
+ final FTrStr resetPwd;
|
|
|
+
|
|
|
/// 忘记密码
|
|
|
final FTrStr forgotPwd;
|
|
|
|
|
|
- /// 重置密码
|
|
|
- final FTrStr resetPwd;
|
|
|
-
|
|
|
/// 账号密码登录
|
|
|
final FTrStr tabOfLoginByAccountPwd;
|
|
|
|
|
|
/// 验证码登录
|
|
|
final FTrStr tabOfLoginByVerificationCode;
|
|
|
|
|
|
- /// Hint-账号 - 手机号/邮箱
|
|
|
+ /// 请输入手机号或邮箱
|
|
|
final FTrStr hint4AccountDouble;
|
|
|
|
|
|
- /// Hint-账号 - 手机号/邮箱/用户名
|
|
|
+ /// 请输入手机号、邮箱或用户名
|
|
|
final FTrStr hint4AccountTriple;
|
|
|
|
|
|
- /// Hint-密码
|
|
|
- final FTrStr hint4Pwd;
|
|
|
-
|
|
|
- /// Hint-确认密码
|
|
|
+ /// 请确认密码
|
|
|
final FTrStr hint4ConfirmPwd;
|
|
|
|
|
|
- /// Hint-验证码
|
|
|
+ /// 请输入密码
|
|
|
+ final FTrStr hint4Pwd;
|
|
|
+
|
|
|
+ /// 请输入验证码
|
|
|
final FTrStr hint4VerificationCode;
|
|
|
|
|
|
- /// 条款政策声明
|
|
|
+ /// 我已阅读并同意
|
|
|
final FTrStr agreeStatement;
|
|
|
|
|
|
- /// 用户条款
|
|
|
- final FTrStr userAgreement;
|
|
|
-
|
|
|
- /// 隐私政策
|
|
|
+ /// 《隐私协议》
|
|
|
final FTrStr privacyPolicy;
|
|
|
|
|
|
- /// 登出
|
|
|
- final FTrStr signOut;
|
|
|
+ /// 《用户使用协议》
|
|
|
+ final FTrStr userAgreement;
|
|
|
|
|
|
- /// 获取验证码
|
|
|
+ /// 发送验证码
|
|
|
final FTrStr sendVerificationCode;
|
|
|
|
|
|
- /// 重新获取验证码
|
|
|
+ /// 重新发送
|
|
|
final FTrStr resendVerificationCode;
|
|
|
|
|
|
- /// 获取验证码倒计时
|
|
|
+ /// 倒计时{0}S
|
|
|
final FTrStr sendVerificationCodeTimer;
|
|
|
|
|
|
+ /// 退出登录
|
|
|
+ final FTrStr signOut;
|
|
|
+
|
|
|
/// 返回登录
|
|
|
final FTrStr back4Login;
|
|
|
|
|
|
- /// 同意声明提示
|
|
|
+ /// 请阅读并同意杏聆荟《用户使用协议》和《隐私政策》
|
|
|
final FTrStr toast4AgreeStatement;
|
|
|
|
|
|
- /// 账密错误提示
|
|
|
+ /// 用户名或密码错误
|
|
|
final FTrStr toast4AccountPwdError;
|
|
|
|
|
|
- /// 账号不存在提示
|
|
|
+ /// 此账号不存在
|
|
|
final FTrStr toast4AccountNotExist;
|
|
|
|
|
|
- /// 账号已存在提示
|
|
|
+ /// 此账号已存在
|
|
|
final FTrStr toast4AccountHasExist;
|
|
|
|
|
|
- /// 账号(手机/邮箱)提示
|
|
|
+ /// 请输入正确的手机号或邮箱
|
|
|
final FTrStr toast4AccountDouble;
|
|
|
|
|
|
- /// 账号(手机/邮箱/用户名)提示
|
|
|
+ /// 请输入正确的手机号、邮箱或用户名
|
|
|
final FTrStr toast4AccountTriple;
|
|
|
|
|
|
- /// 验证码过期提示
|
|
|
+ /// 验证码已过期
|
|
|
final FTrStr toast4VerifyCodeOverdue;
|
|
|
|
|
|
- /// 验证码错误提示
|
|
|
+ /// 验证码错误
|
|
|
final FTrStr toast4VerifyCodeError;
|
|
|
|
|
|
- /// 登录失败提示
|
|
|
+ /// 登录失败
|
|
|
final FTrStr toast4LoginFail;
|
|
|
|
|
|
- /// 登录成功提示
|
|
|
+ /// 登录成功
|
|
|
final FTrStr toast4LoginSuccess;
|
|
|
|
|
|
- /// 注册失败提示
|
|
|
+ /// 注册失败
|
|
|
final FTrStr toast4SignUpFail;
|
|
|
|
|
|
- /// 注册成功提示
|
|
|
+ /// 注册成功
|
|
|
final FTrStr toast4SignUpSuccess;
|
|
|
|
|
|
- /// 重置失败提示
|
|
|
+ /// 重置失败
|
|
|
final FTrStr toast4ResetFail;
|
|
|
|
|
|
- /// 重置成功提示
|
|
|
+ /// 重置成功
|
|
|
final FTrStr toast4ResetSuccess;
|
|
|
|
|
|
- /// 验证码发送失败提示
|
|
|
+ /// 验证码发送失败
|
|
|
final FTrStr toast4VerifyCodeSendFail;
|
|
|
|
|
|
- /// 验证码发送成功提示
|
|
|
+ /// 验证码已发送
|
|
|
final FTrStr toast4VerifyCodeSendSuccess;
|
|
|
|
|
|
- /// 确认密码不一致提示
|
|
|
+ /// 两次密码输入保持一致
|
|
|
final FTrStr toast4ConfirmPwdMatchError;
|
|
|
|
|
|
- /// 密码空格错误提示
|
|
|
+ /// 密码不能包含空格
|
|
|
final FTrStr toast4PwdBlankError;
|
|
|
|
|
|
- /// 密码长度错误提示
|
|
|
+ /// 密码限制长度为6-20位字符
|
|
|
final FTrStr toast4PwdLengthError;
|
|
|
|
|
|
- /// 密码字符组合提示
|
|
|
+ /// 密码必须包含数字、字母、符号中至少2种
|
|
|
final FTrStr toast4PwdCharCombinError;
|
|
|
|
|
|
- /// 账号格式错误提示
|
|
|
+ /// 用户名注册时,限制2~20位字母或数字组合
|
|
|
final FTrStr toast4AccountFormatError;
|
|
|
|
|
|
- ///其他登录方式
|
|
|
+ /// 其他登录方式
|
|
|
final FTrStr otherLoginWay;
|
|
|
|
|
|
+ /// 正在登录...
|
|
|
+ final FTrStr logining;
|
|
|
+
|
|
|
+ /// 正在切换...
|
|
|
+ final FTrStr switching;
|
|
|
+
|
|
|
@override
|
|
|
getProp(String propName) {
|
|
|
- switch (propName) {
|
|
|
- case 'login':
|
|
|
- return login;
|
|
|
- }
|
|
|
- return null;
|
|
|
+ // TODO: implement getProp
|
|
|
+ throw UnimplementedError();
|
|
|
}
|
|
|
}
|