From 15ed05dc1ed6ba9d618c3006b8ab20d005bb96e1 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Fri, 3 Jul 2026 23:21:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(client):=20=E8=AE=BE=E7=BD=AE=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E5=8D=A1=E9=87=8D=E6=8E=92=E2=80=94=E2=80=94=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E8=B4=AD=E4=B9=B0/=E7=BB=AD=E8=B4=B9=E5=8D=87?= =?UTF-8?q?=E4=B8=BA=E4=B8=BB=20CTA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 卡片改名「授权管理」,购买按钮升 primary 并排进到期统计条(窄屏通栏在统计条下方), 不再藏在「没有兑换券?」后面;兑换券降为次要入口;非管理员显示联系管理员+官网价格链接。 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o --- .../lib/screens/settings/settings_screen.dart | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/client/lib/screens/settings/settings_screen.dart b/client/lib/screens/settings/settings_screen.dart index 310de5d..2098385 100644 --- a/client/lib/screens/settings/settings_screen.dart +++ b/client/lib/screens/settings/settings_screen.dart @@ -697,12 +697,13 @@ class _LicensePanelState extends ConsumerState<_LicensePanel> { : null; return _SettingsCard( - title: '授权兑换券', - desc: '本系统以「时长兑换券」授权,输入兑换券短码即可续期,无需订阅', + title: '授权管理', + desc: '在线购买或使用兑换券续期,时长在现有到期时间上叠加', child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ // 原型 .lic 统计条:bg 底 / border / r-md / pad 18 20 + // 主 CTA「在线购买 / 续费」宽屏并排在统计条内,窄屏换行到统计条下方通栏 Container( padding: const EdgeInsets.fromLTRB(20, 18, 20, 18), decoration: BoxDecoration( @@ -715,6 +716,12 @@ class _LicensePanelState extends ConsumerState<_LicensePanel> { const SizedBox(width: 24), _stat(t, '剩余天数', days != null ? '剩余 $days 天' : '—', warn: true), const Spacer(), + if (isAdmin && !context.isMobile) ...[ + DsButton('在线购买 / 续费', + variant: DsBtnVariant.primary, + onPressed: () => showPurchaseDialog(context)), + const SizedBox(width: 14), + ], Container( width: 46, height: 46, @@ -727,6 +734,15 @@ class _LicensePanelState extends ConsumerState<_LicensePanel> { ), ]), ), + if (isAdmin && context.isMobile) ...[ + const SizedBox(height: 12), + SizedBox( + width: double.infinity, + child: DsButton('在线购买 / 续费', + variant: DsBtnVariant.primary, + onPressed: () => showPurchaseDialog(context)), + ), + ], const SizedBox(height: 16), // 兑换(原型 .redeem:input + 按钮,max 520) ConstrainedBox( @@ -758,16 +774,13 @@ class _LicensePanelState extends ConsumerState<_LicensePanel> { ], ), ), - const SizedBox(height: 14), - Row(children: [ - Text('没有兑换券?', - style: TextStyle(fontSize: AppDims.fsSm, color: t.muted)), - // 在线购买仅管理员(后端 purchase 接口 admin only);其他角色引导看官网价格页 - if (isAdmin) - DsButton('在线购买 / 续费', - variant: DsBtnVariant.accent, - onPressed: () => showPurchaseDialog(context)) - else + // 在线购买仅管理员(后端 purchase 接口 admin only,主 CTA 已上移到统计条); + // 其他角色引导看官网价格页 + if (!isAdmin) ...[ + const SizedBox(height: 14), + Row(children: [ + Text('在线购买请联系门店管理员 · ', + style: TextStyle(fontSize: AppDims.fsSm, color: t.muted)), InkWell( onTap: () => launchUrl(Uri.parse('${AppInfo.website}/#pricing')), @@ -777,7 +790,8 @@ class _LicensePanelState extends ConsumerState<_LicensePanel> { fontWeight: FontWeight.w600, color: t.primary)), ), - ]), + ]), + ], const SizedBox(height: 16), // 过期降级说明(现有能力保留) Container(