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
这个提交包含在:
linda
2026-10-15 23:24:03 +08:00
父节点 f806dc269b
当前提交 043227dee7
共有 13 个文件被更改,包括 844 次插入 和 34 次删除

查看文件

@@ -77,6 +77,9 @@ class FcInstall extends Command
$output->writeln('==> 轮播底色与春绿主题对齐');
$this->upgradeBanners($output);
$output->writeln('==> 发布模式与发布套餐升级');
$this->upgradePublish($output);
$output->writeln('==> 初始化后台菜单');
$this->menu($output);
@@ -133,6 +136,121 @@ class FcInstall extends Command
: ' - 轮播底色已是春绿渐变或非内置轮播,无需处理');
}
/**
* 发布模式与发布套餐升级(幂等,可重复执行)
*
* 背景:v1.0.7 新增「免费发布 / 付费发布」开关与付费发布的三档定价
* · 单条价格 post.singlePrice
* · 按月(价格 + 含条数)post.monthPrice / post.monthQuota
* · 按年(价格 + 含条数)post.yearPrice / post.yearQuota
* 老库缺列/缺配置时补齐,**不覆盖运营已改过的值**:
* ① fc_user_ext 补 post_quota_left / post_quota_expire(剩余发布条数 + 有效期)
* ② fc_plan 补 post_quota(套餐含发布条数,月/年卡赠送额度)
* ③ fc_config 补 post.* 六项(已存在则跳过)
* ④ 月卡/年卡的价格与条数以配置为准做一次同步(配置缺失时反向用套餐值填配置)
*/
private function upgradePublish(Output $output)
{
$prefix = \think\Config::get('database.prefix');
$changed = 0;
// ① 用户扩展表:发布额度
$extTable = $prefix . 'fc_user_ext';
if (!$this->hasColumn($extTable, 'post_quota_left')) {
Db::execute("ALTER TABLE `{$extTable}` ADD COLUMN `post_quota_left` int(10) NOT NULL DEFAULT 0"
. " COMMENT '剩余发布条数(月/年套餐赠送)' AFTER `free_view_used`");
$output->writeln(' - ' . $extTable . ' 新增列 post_quota_left');
$changed++;
}
if (!$this->hasColumn($extTable, 'post_quota_expire')) {
Db::execute("ALTER TABLE `{$extTable}` ADD COLUMN `post_quota_expire` int(10) NULL"
. " COMMENT '发布额度有效期(=会员到期时间)' AFTER `post_quota_left`");
$output->writeln(' - ' . $extTable . ' 新增列 post_quota_expire');
$changed++;
}
// ② 会员套餐:含发布条数
$planTable = $prefix . 'fc_plan';
if (!$this->hasColumn($planTable, 'post_quota')) {
Db::execute("ALTER TABLE `{$planTable}` ADD COLUMN `post_quota` int(10) NOT NULL DEFAULT 0"
. " COMMENT '含发布条数(月/年套餐赠送额度)' AFTER `days`");
$output->writeln(' - ' . $planTable . ' 新增列 post_quota');
$changed++;
}
// ③ 配置项(只补缺失的,不覆盖运营已改的值)
$defaults = [
['post.mode', 'free', 'post', '发布模式:free 免费发布 / paid 付费发布'],
['post.singlePrice', '5', 'post', '单条发布价格(元)'],
['post.monthPrice', '19.9', 'post', '按月发布价格(元)'],
['post.monthQuota', '30', 'post', '按月含发布条数'],
['post.yearPrice', '168', 'post', '按年发布价格(元)'],
['post.yearQuota', '500', 'post', '按年含发布条数'],
];
$now = time();
$added = [];
foreach ($defaults as $d) {
if (Db::name('fc_config')->where('key', $d[0])->find()) {
continue;
}
Db::name('fc_config')->insert([
'key' => $d[0], 'value' => $d[1], 'group_key' => $d[2], 'remark' => $d[3],
'createtime' => $now, 'updatetime' => $now,
]);
$added[] = $d[0];
}
if ($added) {
$output->writeln(' - 新增配置 ' . count($added) . ' 项:' . implode(' / ', $added));
$changed++;
}
// ④ 月/年卡「价格 + 含发布条数」与配置对齐
$map = ['M1' => ['post.monthPrice', 'post.monthQuota'], 'M12' => ['post.yearPrice', 'post.yearQuota']];
$synced = 0;
foreach ($map as $code => $keys) {
$plan = Db::name('fc_plan')->where('plan_code', $code)->find();
if (!$plan) {
continue;
}
$price = round((float)$this->cfgValue($keys[0], $plan['price']), 2);
$quota = (int)$this->cfgValue($keys[1], $plan['post_quota']);
if (round((float)$plan['price'], 2) !== $price || (int)$plan['post_quota'] !== $quota) {
Db::name('fc_plan')->where('id', $plan['id'])->update([
'price' => $price,
'post_quota' => $quota,
'updatetime' => time(),
]);
$synced++;
}
}
if ($synced) {
$output->writeln(' - 会员套餐已与发布配置对齐 ' . $synced . ' 条(月/年卡价格与含条数)');
$changed++;
}
$output->writeln($changed
? ' - 完成(发布模式 ' . $this->cfgValue('post.mode', 'free') . ')'
: ' - 发布模式与套餐配置已是最新,无需处理');
}
/** 表是否存在某列 */
private function hasColumn($table, $column)
{
$cols = Db::query("SHOW COLUMNS FROM `{$table}` LIKE '" . addslashes($column) . "'");
return !empty($cols);
}
/** 读配置默认值(不依赖 api 基类的 cfg 缓存) */
private function cfgValue($key, $default = null)
{
$row = Db::name('fc_config')->where('key', $key)->find();
if (!$row || $row['value'] === '' || $row['value'] === null) {
return $default;
}
return $row['value'];
}
/**
* 初始化 FastAdmin 后台菜单(幂等)
*
@@ -211,6 +329,7 @@ class FcInstall extends Command
'fc/distrelation' => ['fc/dist', '分销关系', 'fa fa-sitemap', 95],
'fc/withdraw' => ['fc/dist', '提现审核', 'fa fa-credit-card', 90],
'fc/area' => ['fc/base', '服务区域', 'fa fa-map-o', 95],
'fc/publish' => ['fc/base', '发布与费用配置', 'fa fa-cny', 85],
'fc/draft' => ['fc/base', '草稿箱', 'fa fa-folder-o', 90],
];
$done = 0;
@@ -422,6 +541,7 @@ class FcInstall extends Command
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`origin_price` decimal(10,2) NOT NULL DEFAULT '0.00',
`days` int(10) NOT NULL DEFAULT '30',
`post_quota` int(10) NOT NULL DEFAULT '0' COMMENT '含发布条数(月/年套餐赠送额度)',
`tag` varchar(16) NOT NULL DEFAULT '',
`sort` int(10) NOT NULL DEFAULT '0',
`enabled` tinyint(1) NOT NULL DEFAULT '1',
@@ -444,6 +564,8 @@ class FcInstall extends Command
`inviter_id` int(10) unsigned NOT NULL DEFAULT '0',
`free_view_date` varchar(10) NOT NULL DEFAULT '' COMMENT '免费查看额度基准日',
`free_view_used` int(10) NOT NULL DEFAULT '0',
`post_quota_left` int(10) NOT NULL DEFAULT '0' COMMENT '剩余发布条数(月/年套餐赠送)',
`post_quota_expire` int(10) DEFAULT NULL COMMENT '发布额度有效期(=会员到期时间)',
`createtime` int(10) DEFAULT NULL,
`updatetime` int(10) DEFAULT NULL,
PRIMARY KEY (`id`),
@@ -565,6 +687,13 @@ class FcInstall extends Command
['fee.memberMonth', '19.9', 'fee', '月卡价格'],
['fee.memberQuarter', '49.9', 'fee', '季卡价格'],
['fee.memberYear', '168', 'fee', '年卡价格'],
// 发布模式与发布套餐(后台「发布与费用配置」页维护;真源=配置,保存时同步 fc_plan)
['post.mode', 'free', 'post', '发布模式:free 免费发布 / paid 付费发布(默认免费,避免上线即撞付费墙)'],
['post.singlePrice', '5', 'post', '单条发布价格(元)'],
['post.monthPrice', '19.9', 'post', '按月发布价格(元)'],
['post.monthQuota', '30', 'post', '按月含发布条数'],
['post.yearPrice', '168', 'post', '按年发布价格(元)'],
['post.yearQuota', '500', 'post', '按年含发布条数'],
['dist.enabled', '1', 'dist', '是否开启分销'],
['dist.level', '2', 'dist', '分佣层级'],
['dist.level1Rate', '20', 'dist', '一级分佣比例%'],
@@ -629,14 +758,15 @@ class FcInstall extends Command
/* ---------- 会员套餐 ---------- */
$plans = [
['M1', '月卡', 19.9, 29.9, 30, '尝鲜'],
['M3', '季卡', 49.9, 89.7, 90, '最划算'],
['M12', '年卡', 168, 358.8, 365, '省心'],
['M1', '月卡', 19.9, 29.9, 30, '尝鲜', 30],
['M3', '季卡', 49.9, 89.7, 90, '最划算', 90],
['M12', '年卡', 168, 358.8, 365, '省心', 500],
];
foreach ($plans as $i => $p) {
Db::name('fc_plan')->insert([
'plan_code' => $p[0], 'name' => $p[1], 'price' => $p[2], 'origin_price' => $p[3],
'days' => $p[4], 'tag' => $p[5], 'sort' => $i + 1, 'enabled' => 1,
'post_quota' => $p[6],
'createtime' => $now, 'updatetime' => $now,
]);
}

查看文件

@@ -78,6 +78,46 @@ class Post extends Backend
$this->success('审核成功');
}
/**
* 置顶 / 取消置顶(支持批量)
* POST fc/post/top {ids:'1,2', isTop:1|0}
* 说明:置顶信息在用户端主页与列表**排在非置顶之前**(Home::feed / Post::mine 均按 is_top desc 排序)
*/
public function top()
{
$ids = $this->request->post('ids');
$isTop = (int)$this->request->post('isTop', 1);
if (!in_array($isTop, [0, 1], true)) {
$this->error('置顶状态仅支持置顶(1)/取消置顶(0)');
}
$ids = is_array($ids) ? $ids : explode(',', (string)$ids);
$ids = array_filter($ids);
if (!$ids) {
$this->error('请选择要操作的信息');
}
$posts = Db::name('fc_post')->where('id', 'in', $ids)->select();
if (!$posts) {
$this->error('信息不存在');
}
foreach ($posts as $post) {
Db::name('fc_post')->where('id', $post['id'])->update([
'is_top' => $isTop,
'updatetime' => time(),
]);
Db::name('fc_message')->insert([
'user_id' => $post['user_id'],
'type' => 'system',
'title' => $isTop === 1 ? '信息已置顶' : '已取消置顶',
'content' => $isTop === 1
? '您发布的信息「' . $post['title'] . '」已被置顶,将在首页优先展示'
: '您发布的信息「' . $post['title'] . '」已取消置顶',
'isread' => 0,
'createtime' => time(),
]);
}
$this->success($isTop === 1 ? '置顶成功' : '已取消置顶');
}
/**
* 下架信息
*/

查看文件

@@ -0,0 +1,139 @@
<?php
namespace app\admin\controller\fc;
use app\common\controller\Backend;
use think\Db;
/**
* 同城-发布与费用配置
*
* 本页是「发布模式 + 发布价格/条数」的唯一入口:
* 真源 = fa_fc_config 的 post.* 分组;保存时同步 fa_fc_plan 的月/年卡价格与含发布条数,
* 保证「发布页价格」「会员中心套餐价」「后端计费」三者一致。
*
* post.mode free 免费发布 / paid 付费发布
* post.singlePrice 单条发布价格(元)
* post.monthPrice 按月发布价格(元)
* post.monthQuota 按月含发布条数
* post.yearPrice 按年发布价格(元)
* post.yearQuota 按年含发布条数
*
* @icon fa fa-cny
*/
class Publish extends Backend
{
/** 发布模式取值 */
const MODES = ['free', 'paid'];
/**
* 配置页(GET 显示 / POST 保存)
*/
public function index()
{
if ($this->request->isPost()) {
return $this->save();
}
$this->view->assign('row', $this->current());
$this->view->assign('plans', Db::name('fc_plan')->order('sort asc')->select());
return $this->view->fetch();
}
/**
* 保存配置并同步会员套餐
*/
protected function save()
{
$params = $this->request->post('row/a');
if (!is_array($params)) {
$params = $this->request->post();
}
$mode = isset($params['mode']) ? trim((string)$params['mode']) : 'paid';
if (!in_array($mode, self::MODES, true)) {
$this->error('发布模式只支持「免费发布」或「付费发布」');
}
$num = function ($key, $default) use ($params) {
if (!isset($params[$key]) || $params[$key] === '') {
return $default;
}
return round((float)$params[$key], 2);
};
$int = function ($key, $default) use ($params) {
if (!isset($params[$key]) || $params[$key] === '') {
return $default;
}
return (int)$params[$key];
};
$single = $num('singlePrice', 5);
$monthPrice = $num('monthPrice', 19.9);
$yearPrice = $num('yearPrice', 168);
$monthQuota = $int('monthQuota', 30);
$yearQuota = $int('yearQuota', 500);
foreach (['单条发布价格' => $single, '按月发布价格' => $monthPrice, '按年发布价格' => $yearPrice] as $label => $v) {
if ($v < 0) {
$this->error($label . '不能为负');
}
}
if ($monthQuota < 0 || $yearQuota < 0) {
$this->error('含发布条数不能为负');
}
$now = time();
$values = [
'post.mode' => $mode,
'post.singlePrice' => $single,
'post.monthPrice' => $monthPrice,
'post.monthQuota' => $monthQuota,
'post.yearPrice' => $yearPrice,
'post.yearQuota' => $yearQuota,
];
foreach ($values as $key => $val) {
$exist = Db::name('fc_config')->where('key', $key)->find();
if ($exist) {
Db::name('fc_config')->where('key', $key)->update(['value' => (string)$val, 'updatetime' => $now]);
} else {
Db::name('fc_config')->insert([
'key' => $key, 'value' => (string)$val, 'group_key' => 'post',
'remark' => '发布与费用配置', 'createtime' => $now, 'updatetime' => $now,
]);
}
}
// 同步月/年卡(价格 + 含发布条数);季卡价格按「月卡 ×3」的默认口径不动
Db::name('fc_plan')->where('plan_code', 'M1')->update([
'price' => $monthPrice, 'post_quota' => $monthQuota, 'updatetime' => $now,
]);
Db::name('fc_plan')->where('plan_code', 'M12')->update([
'price' => $yearPrice, 'post_quota' => $yearQuota, 'updatetime' => $now,
]);
$this->success('发布配置已保存并同步会员套餐');
}
/** 当前配置(缺失时回落 fee.* 与内置默认) */
protected function current()
{
$cfg = [];
foreach (Db::name('fc_config')->select() as $r) {
$cfg[$r['key']] = $r['value'];
}
$pick = function ($key, $default) use ($cfg) {
return (isset($cfg[$key]) && $cfg[$key] !== '') ? $cfg[$key] : $default;
};
$mode = (string)$pick('post.mode', 'paid');
return [
'mode' => in_array($mode, self::MODES, true) ? $mode : 'paid',
'singlePrice' => $pick('post.singlePrice', $pick('fee.singlePost', '5')),
'monthPrice' => $pick('post.monthPrice', $pick('fee.memberMonth', '19.9')),
'monthQuota' => $pick('post.monthQuota', '30'),
'yearPrice' => $pick('post.yearPrice', $pick('fee.memberYear', '168')),
'yearQuota' => $pick('post.yearQuota', '500'),
];
}
}

查看文件

@@ -32,5 +32,11 @@ return [
'Deletetime' => '删除时间',
'AuditPass' => '审核通过',
'AuditReject' => '审核驳回',
'OfflinePost' => '下架'
'OfflinePost' => '下架',
'TopPost' => '置顶',
'CancelTopPost' => '取消置顶',
'已置顶' => '已置顶',
'未置顶' => '未置顶',
'确认置顶选中的信息?' => '确认置顶选中的信息?置顶后将在用户端首页优先展示。',
'确认取消置顶选中的信息?' => '确认取消置顶选中的信息?',
];

查看文件

@@ -0,0 +1,39 @@
<?php
return [
'说明' => '说明',
'发布模式' => '发布模式',
'免费发布(所有用户均可免费发布)' => '免费发布(所有用户均可免费发布)',
'付费发布(按下面价格计费,套餐额度内免费)' => '付费发布(按下面价格计费,套餐额度内免费)',
'会员单条发布价格' => '会员单条发布价格',
'会员按月发布' => '会员按月发布',
'会员按年发布' => '会员按年发布',
'元/条' => '元/条',
'元/月' => '元/月',
'元/年' => '元/年',
'条/月' => '条/月',
'条/年' => '条/年',
'保存' => '保存',
'是否' => '是否',
'是' => '是',
'否' => '否',
'当前会员套餐' => '当前会员套餐',
'套餐编码' => '套餐编码',
'套餐名称' => '套餐名称',
'售价' => '售价',
'有效天数' => '有效天数',
'含发布条数' => '含发布条数',
'是否启用' => '是否启用',
'本页是「发布模式 + 发布价格/条数」的唯一入口;保存后会同步「会员套餐」的月/年卡价格与含发布条数,因此用户端发布页、会员中心与后端计费口径一致。'
=> '本页是「发布模式 + 发布价格/条数」的唯一入口;保存后会同步「会员套餐」的月/年卡价格与含发布条数,因此用户端发布页、会员中心与后端计费口径一致。',
'「会员单条发布价格」= 未购买套餐时按条计费的价格;「按月/按年」= 会员套餐价格,并赠送对应条数的发布额度(额度随会员有效期,过期自动清零)。'
=> '「会员单条发布价格」= 未购买套餐时按条计费的价格;「按月/按年」= 会员套餐价格,并赠送对应条数的发布额度(额度随会员有效期,过期自动清零)。',
'未开通套餐的用户按此价格付费发布(金额由服务端计算,前端不可传价)'
=> '未开通套餐的用户按此价格付费发布(金额由服务端计算,前端不可传价)',
'价格与条数会同步到「会员套餐 → 月卡(M1)」;购买后立即赠送该条数的发布额度'
=> '价格与条数会同步到「会员套餐 → 月卡(M1)」;购买后立即赠送该条数的发布额度',
'价格与条数会同步到「会员套餐 → 年卡(M12)」;购买后立即赠送该条数的发布额度'
=> '价格与条数会同步到「会员套餐 → 年卡(M12)」;购买后立即赠送该条数的发布额度',
'(月/年卡的价格与含发布条数由本页同步,其余字段在「交易管理 → 会员套餐」维护)'
=> '(月/年卡的价格与含发布条数由本页同步,其余字段在「交易管理 → 会员套餐」维护)',
];

查看文件

@@ -13,6 +13,8 @@
<a href="javascript:;" class="btn btn-success btn-audit-pass btn-disabled disabled" title="{:__('AuditPass')}"><i class="fa fa-check"></i> {:__('AuditPass')}</a>
<a href="javascript:;" class="btn btn-danger btn-audit-reject btn-disabled disabled" title="{:__('AuditReject')}"><i class="fa fa-times"></i> {:__('AuditReject')}</a>
<a href="javascript:;" class="btn btn-warning btn-offline btn-disabled disabled" title="{:__('OfflinePost')}"><i class="fa fa-arrow-down"></i> {:__('OfflinePost')}</a>
<a href="javascript:;" class="btn btn-info btn-top btn-disabled disabled" title="{:__('TopPost')}"><i class="fa fa-arrow-up"></i> {:__('TopPost')}</a>
<a href="javascript:;" class="btn btn-default btn-untop btn-disabled disabled" title="{:__('CancelTopPost')}"><i class="fa fa-arrow-down"></i> {:__('CancelTopPost')}</a>

查看文件

@@ -0,0 +1,118 @@
<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>