1
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-05-02 20:43:41 +08:00
parent 543ccf2509
commit 5831703156
36 changed files with 799 additions and 254 deletions

View File

@@ -75,7 +75,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(),
@@ -457,14 +457,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);
@@ -474,7 +474,7 @@ mod tests {
assert!(
benefits
.iter()
.any(|benefit| benefit.benefit_name == "叙世币回合数")
.any(|benefit| benefit.benefit_name == "光点回合数")
);
}