已完成用户APP首期功能开发
交付用户端首期页面、配套接口、后台资源及测试文档。用户APP构建、静态分析和三个管理后台构建通过;完整测试仍有2项失败,后端模型注释检查未通过,详见交付记录。
This commit is contained in:
@@ -20,31 +20,54 @@ class UserProfile {
|
||||
required this.name,
|
||||
required this.phone,
|
||||
required this.avatar,
|
||||
this.realName = '',
|
||||
});
|
||||
|
||||
final String identity;
|
||||
final String name;
|
||||
final String phone;
|
||||
final String avatar;
|
||||
final String realName;
|
||||
|
||||
factory UserProfile.fromJson(Map<String, Object?> json) => UserProfile(
|
||||
identity: json['identity'] as String? ?? '',
|
||||
name: json['name'] as String? ?? '',
|
||||
phone: json['phone'] as String? ?? '',
|
||||
avatar: json['avatar'] as String? ?? '',
|
||||
realName: json['real_name'] as String? ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
class WalletSummary {
|
||||
const WalletSummary({required this.balance, required this.withdrawalBalance});
|
||||
const WalletSummary({
|
||||
required this.balance,
|
||||
required this.withdrawalBalance,
|
||||
this.paymentPasswordSet,
|
||||
});
|
||||
|
||||
final int balance;
|
||||
final int withdrawalBalance;
|
||||
// 缺少状态时保持未知,不能误当作未设置支付密码。
|
||||
final bool? paymentPasswordSet;
|
||||
|
||||
factory WalletSummary.fromJson(Map<String, Object?> json) => WalletSummary(
|
||||
balance: (json['balance'] as num?)?.toInt() ?? 0,
|
||||
withdrawalBalance: (json['withdrawal_balance'] as num?)?.toInt() ?? 0,
|
||||
paymentPasswordSet: json['payment_password_set'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
/// 手机验证码申请结果,明确区分请求建立与短信已发送。
|
||||
class PaymentCodeRequest {
|
||||
const PaymentCodeRequest({
|
||||
required this.identity,
|
||||
required this.delivered,
|
||||
required this.maskedPhone,
|
||||
required this.retryAfter,
|
||||
});
|
||||
final String identity, maskedPhone;
|
||||
final bool delivered;
|
||||
final int retryAfter;
|
||||
}
|
||||
|
||||
String moneyText(int cents) => '¥${(cents / 100).toStringAsFixed(2)}';
|
||||
|
||||
Reference in New Issue
Block a user