This commit is contained in:
2026-05-14 14:21:17 +08:00
parent 7a75f5d612
commit d33c937ebc
191 changed files with 1916 additions and 1549 deletions

View File

@@ -106,7 +106,7 @@ impl std::fmt::Display for RuntimeProfileFieldError {
Self::InvalidWalletAmount => f.write_str("profile.wallet_amount 必须大于 0"),
Self::WalletAmountOverflow => f.write_str("profile.wallet_amount 超出上限"),
Self::WalletBalanceOverflow => f.write_str("profile.wallet_balance 超出上限"),
Self::InsufficientWalletBalance => f.write_str("点余额不足"),
Self::InsufficientWalletBalance => f.write_str("点余额不足"),
Self::MissingInviteCode => f.write_str("referral.invite_code 不能为空"),
Self::MissingRedeemCode => f.write_str("兑换码不能为空"),
Self::RedeemCodeDisabled => f.write_str("兑换码已停用"),

View File

@@ -22,57 +22,57 @@ pub fn runtime_profile_recharge_point_products() -> Vec<RuntimeProfileRechargePr
vec![
build_points_recharge_product(
"points_60",
"60",
"60",
600,
60,
60,
"首充双倍",
"首充送60",
"首充送60",
),
build_points_recharge_product(
"points_180",
"180",
"180",
1800,
180,
180,
"首充双倍",
"首充送180",
"首充送180",
),
build_points_recharge_product(
"points_300",
"300",
"300",
3000,
300,
300,
"首充双倍",
"首充送300",
"首充送300",
),
build_points_recharge_product(
"points_680",
"680",
"680",
6800,
680,
680,
"首充双倍",
"首充送680",
"首充送680",
),
build_points_recharge_product(
"points_1280",
"1280",
"1280",
12800,
1280,
1280,
"首充双倍",
"首充送1280",
"首充送1280",
),
build_points_recharge_product(
"points_3280",
"3280",
"3280",
32800,
3280,
3280,
"首充双倍",
"首充送3280",
"首充送3280",
),
]
}
@@ -121,7 +121,7 @@ pub fn runtime_profile_membership_benefits() -> Vec<RuntimeProfileMembershipBene
year_value: "¥248".to_string(),
},
RuntimeProfileMembershipBenefitSnapshot {
benefit_name: "点回合数".to_string(),
benefit_name: "点回合数".to_string(),
normal_value: "30".to_string(),
month_value: "100".to_string(),
season_value: "100".to_string(),
@@ -635,14 +635,14 @@ mod tests {
assert_eq!(point_products.len(), 6);
assert_eq!(point_products[0].product_id, "points_60");
assert_eq!(point_products[0].title, "60");
assert_eq!(point_products[0].title, "60");
assert_eq!(point_products[0].price_cents, 600);
assert_eq!(point_products[0].bonus_points, 60);
assert_eq!(point_products[0].description, "首充送60");
assert_eq!(point_products[0].description, "首充送60");
assert_eq!(point_products[5].product_id, "points_3280");
assert_eq!(point_products[5].price_cents, 32800);
assert_eq!(point_products[5].bonus_points, 3280);
assert_eq!(point_products[5].description, "首充送3280");
assert_eq!(point_products[5].description, "首充送3280");
assert_eq!(membership_products.len(), 3);
assert_eq!(membership_products[0].title, "月卡");
assert_eq!(membership_products[0].price_cents, 2800);
@@ -652,7 +652,7 @@ mod tests {
assert!(
benefits
.iter()
.any(|benefit| benefit.benefit_name == "点回合数")
.any(|benefit| benefit.benefit_name == "点回合数")
);
}