feat(client): 设置授权卡重排——在线购买/续费升为主 CTA
卡片改名「授权管理」,购买按钮升 primary 并排进到期统计条(窄屏通栏在统计条下方), 不再藏在「没有兑换券?」后面;兑换券降为次要入口;非管理员显示联系管理员+官网价格链接。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user