Files
jiu/client/lib/core/config/license_plans.dart
T
wangjia 24123eb93c feat(client): App 内在线购买/续费授权(管理员支付宝下单+到账轮询)
- 新增套餐目录 license_plans.dart(标准/高级 × 月付/年付,与官网 checkout 一致)
- license 模型/仓库新增 PurchaseOrder/PurchaseStatusInfo 与下单、查单接口
- 系统设置授权面板:管理员显示「在线购买 / 续费」按钮,弹窗选套餐→
  外部浏览器打开支付宝收银台→3s 轮询到账→自动刷新授权并展示新到期日
- 用户手册(docs.md + user-manual.html)同步补充在线购买入口说明

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

47 lines
1.4 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 {
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];
}