文件
fenleixinxi/application/admin/view/fc/publish/index.html
linda 043227dee7 feat(admin): 信息置顶 + 发布与费用配置(免费/付费开关、单条与月年卡价格含条数)
需求落地:
- 置顶:fc/post 新增 top 动作(批量置顶/取消置顶 + 站内消息通知),列表加「置顶/取消置顶」工具栏按钮、
  行内按钮与置顶状态徽章;置顶信息在用户端首页与「我的发布」中优先展示(Home::feed 按 is_top desc)
- 发布与费用配置(新增页面:同城业务 → 基础数据 → 发布与费用配置,fc/publish):
  发布模式(免费发布 / 付费发布)、会员单条发布价格、按月(价格 + 含条数)、按年(价格 + 含条数);
  真源为 fc_config 的 post.*,保存时同步 fc_plan 的月卡(M1)/年卡(M12) 价格与 post_quota
- FcInstall:新增 post.* 六项配置(默认免费发布,避免上线即撞付费墙);fc_user_ext 加 post_quota_left /
  post_quota_expire(套餐额度与有效期)、fc_plan 加 post_quota;新增 upgradePublish() 幂等升级老库并同步月/年卡
- tools/verify-api.mjs:新增 P9 发布配置 / P8 我的发布 契约校验,P1 发布改为「免费模式/额度内发布」并按付费模式容错
- 语言包与视图同步中文,均通过 php -l 与 node --check
2026-10-15 23:24:03 +08:00

119 行
6.7 KiB
HTML

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div class="alert alert-info" style="margin-bottom:16px;">
<strong>{:__('说明')}:</strong>
{:__('本页是「发布模式 + 发布价格/条数」的唯一入口;保存后会同步「会员套餐」的月/年卡价格与含发布条数,因此用户端发布页、会员中心与后端计费口径一致。')}
<br/>
{:__('「会员单条发布价格」= 未购买套餐时按条计费的价格;「按月/按年」= 会员套餐价格,并赠送对应条数的发布额度(额度随会员有效期,过期自动清零)。')}
</div>
<div class="widget-body no-padding">
<form class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('fc/publish/index')}">
{:token()}
<table class="table table-striped">
<tbody>
<tr>
<th width="22%">{:__('发布模式')}</th>
<td>
<label class="radio-inline">
<input type="radio" name="row[mode]" value="free" {if $row.mode=='free'}checked{/if}/>
{:__('免费发布(所有用户均可免费发布)')}
</label>
<label class="radio-inline">
<input type="radio" name="row[mode]" value="paid" {if $row.mode!='free'}checked{/if}/>
{:__('付费发布(按下面价格计费,套餐额度内免费)')}
</label>
</td>
</tr>
<tr>
<th>{:__('会员单条发布价格')}</th>
<td>
<div class="input-group" style="max-width:220px;">
<span class="input-group-addon">¥</span>
<input type="number" step="0.01" min="0" name="row[singlePrice]" class="form-control"
value="{$row.singlePrice}" data-rule="required;number"/>
<span class="input-group-addon">{:__('元/条')}</span>
</div>
<span class="help-block">{:__('未开通套餐的用户按此价格付费发布(金额由服务端计算,前端不可传价)')}</span>
</td>
</tr>
<tr>
<th>{:__('会员按月发布')}</th>
<td>
<div class="input-group" style="max-width:220px;display:inline-table;">
<span class="input-group-addon">¥</span>
<input type="number" step="0.01" min="0" name="row[monthPrice]" class="form-control"
value="{$row.monthPrice}" data-rule="required;number"/>
<span class="input-group-addon">{:__('元/月')}</span>
</div>
<div class="input-group" style="max-width:220px;display:inline-table;margin-left:12px;">
<input type="number" step="1" min="0" name="row[monthQuota]" class="form-control"
value="{$row.monthQuota}" data-rule="required;number"/>
<span class="input-group-addon">{:__('条/月')}</span>
</div>
<span class="help-block">{:__('价格与条数会同步到「会员套餐 → 月卡(M1)」;购买后立即赠送该条数的发布额度')}</span>
</td>
</tr>
<tr>
<th>{:__('会员按年发布')}</th>
<td>
<div class="input-group" style="max-width:220px;display:inline-table;">
<span class="input-group-addon">¥</span>
<input type="number" step="0.01" min="0" name="row[yearPrice]" class="form-control"
value="{$row.yearPrice}" data-rule="required;number"/>
<span class="input-group-addon">{:__('元/年')}</span>
</div>
<div class="input-group" style="max-width:220px;display:inline-table;margin-left:12px;">
<input type="number" step="1" min="0" name="row[yearQuota]" class="form-control"
value="{$row.yearQuota}" data-rule="required;number"/>
<span class="input-group-addon">{:__('条/年')}</span>
</div>
<span class="help-block">{:__('价格与条数会同步到「会员套餐 → 年卡(M12)」;购买后立即赠送该条数的发布额度')}</span>
</td>
</tr>
</tbody>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success btn-embossed">{:__('保存')}</button>
</div>
</div>
</form>
</div>
<div class="widget-body no-padding">
<div class="alert alert-warning" style="margin:16px 0 8px;">
<strong>{:__('当前会员套餐')}</strong>
{:__('(月/年卡的价格与含发布条数由本页同步,其余字段在「交易管理 → 会员套餐」维护)')}
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>{:__('套餐编码')}</th>
<th>{:__('套餐名称')}</th>
<th>{:__('售价')}</th>
<th>{:__('有效天数')}</th>
<th>{:__('含发布条数')}</th>
<th>{:__('是否启用')}</th>
</tr>
</thead>
<tbody>
{foreach $plans as $p}
<tr>
<td>{$p.plan_code}</td>
<td>{$p.name}</td>
<td>¥{$p.price}</td>
<td>{$p.days}</td>
<td>{$p.post_quota}</td>
<td>{if $p.enabled}{:__('是')}{else/}{:__('否')}{/if}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>