Files
jiu/client/lib/core/config/license_plans.dart
T
wangjia b3c9d98eae feat: ¥1 首月特惠套餐(新店专享,每店限购一次,官网+App 同步上线)
- 后端:payPlans 新增 promo_first_month(¥1/30 天/标准版权益);下单强校验每店限购一次(仅 paid 计数,弃单可重下),已享用返回 409;新增 GET /license/promo-status 供前端置灰
- 官网:checkout 套餐段第二位插「🔥 首月特惠 ¥1」+ 推广横幅 + 划线原价 ¥299;首页价格区第二位插特惠卡(5 列);已享用自动置灰
- App:购买弹窗套餐段改三档(标准/特惠/高级),特惠选中显示推广横幅与划线价,已享用置灰并禁用提交
- 实付金额以 pay 侧为准,pay 需 seed promo_first_month 产品后生效

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
2026-07-03 22:25:07 +08:00

58 lines
1.9 KiB
Dart

/// 在线购买套餐目录(App 内购买/续费弹窗用)。
///
/// 价格仅前端展示,实付金额以 pay 侧套餐表为准(下单响应回传 amount);
/// biz_code 与后端 payPlans、官网 checkout 页三方一致,改动需同步。
class LicensePlan {
final String bizCode;
final int price; // 元(仅展示)
final int days;
const LicensePlan(this.bizCode, this.price, this.days);
}
class LicensePlanGroup {
final String name;
final List<String> feats;
final LicensePlan monthly;
final LicensePlan annual;
const LicensePlanGroup({
required this.name,
required this.feats,
required this.monthly,
required this.annual,
});
}
class LicensePlans {
/// 新店首月特惠:¥1 体验 30 天标准版全部功能,每个门店限购一次
/// (服务端强校验,前端据 GET /license/promo-status 置灰)。
static const promo = LicensePlan('promo_first_month', 1, 30);
static const promoOriginalPrice = 299; // 划线原价(=标准版月付)
static const promoFeats = [
'标准版全部功能,一分不少',
'单门店 · 单仓库 · 2 台客户端',
'1,000 张商品图片分享',
'每个门店限购一次',
];
static const standard = LicensePlanGroup(
name: '标准版',
feats: ['单门店 · 单仓库', '2 台客户端同时使用', '1,000 张商品图片分享'],
monthly: LicensePlan('monthly_standard', 299, 30),
annual: LicensePlan('annual_standard', 2999, 365),
);
static const pro = LicensePlanGroup(
name: '高级版',
feats: [
'单门店 · 多仓库',
'5 台客户端同时使用',
'10,000 张商品图片分享',
'免费 AI 周度 / 月度商业数据分析',
],
monthly: LicensePlan('monthly_pro', 599, 30),
annual: LicensePlan('annual_pro', 5999, 365),
);
static const groups = [standard, pro];
}