文件
fenleixinxi/application/admin/view/fc/publish/index.html
MiAn d871e73d23 feat: 重构会员权益与分销配置,新增套餐维度权益管理
1. 新增会员权益配置控制器 Memberbenefit 和 Publish,拆分运营配置模块
2. 新增套餐表字段 free_view_quota、post_discount,支持按套餐配置免费看和发帖折扣
3. 优化前端页面,新增套餐编辑表单、区域选择器、发布配置交互
4. 新增调试支持,支持 mock openid、本地 IP 绕过权限,便于自动化测试
5. 新增数据库工具脚本,用于检查配置、修复数据、验证会员功能
6. 优化会员接口,返回套餐维度的权益信息,支持无限次免费看场景
2026-10-26 09:21:51 +08:00

225 行
14 KiB
HTML

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

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

<style>
.fc-mode-tip {
display: inline-block;
padding: 6px 12px;
border-radius: 4px;
font-size: 12px;
margin-top: 6px;
}
.fc-mode-tip--free {
background: #ecfdf5;
color: #059669;
border: 1px solid #a7f3d0;
}
</style>
<div class="panel panel-default panel-intro">
<div class="panel-heading">
<div class="panel-lead">
<em>运营配置</em>
集中管理同城平台核心运营规则:信息发布收费/免费规则、联系方式浏览公开/解锁规则、以及二级分销返佣规则。至于 VIP 会员的赠送发帖数、每日免费看次数与折扣,请直接在「会员套餐」列表各套餐中设置。
</div>
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-publish" data-toggle="tab"><i class="fa fa-paper-plane-o"></i> 发布配置</a></li>
<li><a href="#tab-view" data-toggle="tab"><i class="fa fa-phone"></i> 浏览配置</a></li>
<li><a href="#tab-dist" data-toggle="tab"><i class="fa fa-sitemap"></i> 分销配置</a></li>
</ul>
</div>
<div class="panel-body">
<form id="publish-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('fc/publish/index')}">
{:token()}
<div id="myTabContent" class="tab-content" style="padding-top: 15px;">
<!-- Tab 1:信息发布配置 -->
<div class="tab-pane fade active in" id="tab-publish">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">发布模式:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
<label style="margin-right: 24px;">
<input type="radio" name="row[fc_post_mode]" value="free" {if $row.postMode=='free'}checked{/if}>
<strong>完全免费发布</strong>(全站零门槛不限条数免费发帖)
</label>
<label>
<input type="radio" name="row[fc_post_mode]" value="paid" {if $row.postMode=='paid'}checked{/if}>
<strong>按规则收费发布</strong>(支持设置公共免费条数,超出后扣会员额度或按单条计费)
</label>
</div>
<div id="post-mode-free-tip" class="fc-mode-tip fc-mode-tip--free" style="{if $row.postMode!='free'}display:none;{/if}">
<i class="fa fa-check-circle"></i> 当前为「完全免费发布」:所有用户发帖均不收费、不限次数,小程序端直接一键免费发布。
</div>
</div>
</div>
<div id="post-paid-fields" style="{if $row.postMode=='free'}display:none;{/if}">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">公共免费额度:</label>
<div class="col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" min="0" step="1" class="form-control" name="row[fc_post_freeQuota]" value="{$row.freeQuota|htmlentities}" data-rule="required;integer;range(0~)"/>
<span class="input-group-addon">条</span>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">填 <code>0</code> 表示无公共免费额度;填 <code>&gt;0</code> 表示每个周期内前 N 条免费</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">免费统计周期:</label>
<div class="col-xs-12 col-sm-4">
<select class="form-control selectpicker" name="row[fc_post_freeQuotaCycle]">
<option value="day" {if $row.freeQuotaCycle=='day'}selected{/if}>每日重置(每天享免费条数)</option>
<option value="month" {if $row.freeQuotaCycle=='month'}selected{/if}>每月重置(每月享免费条数)</option>
<option value="total" {if $row.freeQuotaCycle=='total'}selected{/if}>累计终身(新用户总共免费条数)</option>
</select>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">配合上方「公共免费额度」使用</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">单条发布原价:</label>
<div class="col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" min="0" step="0.01" class="form-control" name="row[fc_post_singlePrice]" value="{$row.singlePrice|htmlentities}" data-rule="required;range(0~)"/>
<span class="input-group-addon">元 / 条</span>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">超出免费额度与会员套餐额度后的单条发布标准价(VIP 会员自动按所属套餐的折扣率折算)</span>
</div>
</div>
</div>
</div>
<!-- Tab 2:联系方式浏览配置 -->
<div class="tab-pane fade" id="tab-view">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">浏览模式:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
<label style="margin-right: 24px;">
<input type="radio" name="row[fc_fee_viewMode]" value="free" {if $row.viewMode=='free'}checked{/if}>
<strong>完全免费公开</strong>(详情页直接明文展示手机号与微信,支持一键拨打)
</label>
<label>
<input type="radio" name="row[fc_fee_viewMode]" value="paid" {if $row.viewMode=='paid'}checked{/if}>
<strong>付费或会员解锁</strong>(默认打码保护隐私,需单次付费或使用 VIP 免费看额度解锁)
</label>
</div>
<div id="view-mode-free-tip" class="fc-mode-tip fc-mode-tip--free" style="{if $row.viewMode!='free'}display:none;{/if}">
<i class="fa fa-check-circle"></i> 当前为「完全免费公开」:所有帖子电话与微信号零门槛直显,无需解锁。
</div>
</div>
</div>
<div id="view-paid-fields" style="{if $row.viewMode=='free'}display:none;{/if}">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">非会员单次查看价:</label>
<div class="col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" min="0" step="0.01" class="form-control" name="row[fc_fee_payView]" value="{$row.payViewPrice|htmlentities}" data-rule="required;range(0~)"/>
<span class="input-group-addon">元 / 次</span>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">普通用户解锁单条帖子联系方式的价格(同一条信息一次解锁永久有效;VIP 会员每日免费看次数在各会员套餐中设置)</span>
</div>
</div>
</div>
</div>
<!-- Tab 3:分销配置 -->
<div class="tab-pane fade" id="tab-dist">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">开启全民分销:</label>
<div class="col-xs-12 col-sm-4">
<input id="c-dist-enabled" name="row[fc_dist_enabled]" type="hidden" value="{$row.distEnabled?1:0}">
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-dist-enabled" data-yes="1" data-no="0">
<i class="fa fa-toggle-on text-success {if !$row.distEnabled}fa-flip-horizontal text-gray{/if} fa-2x"></i>
</a>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">开启后,用户邀请好友开通会员、付费发帖、付费看电话均可按比例获得推广佣金</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">分佣层级:</label>
<div class="col-xs-12 col-sm-4">
<select class="form-control selectpicker" name="row[fc_dist_level]">
<option value="1" {if $row.distLevel==1}selected{/if}>一级分销(仅直推上级拿佣金)</option>
<option value="2" {if $row.distLevel==2}selected{/if}>二级分销(直推 + 间推上级拿佣金)</option>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">一级分佣比例:</label>
<div class="col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" min="0" max="100" step="0.1" class="form-control" name="row[fc_dist_level1Rate]" value="{$row.distLevel1|htmlentities}" data-rule="required;range(0~100)"/>
<span class="input-group-addon">%</span>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">直接推荐人获得的订单实付金额百分比</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">二级分佣比例:</label>
<div class="col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" min="0" max="100" step="0.1" class="form-control" name="row[fc_dist_level2Rate]" value="{$row.distLevel2|htmlentities}" data-rule="required;range(0~100)"/>
<span class="input-group-addon">%</span>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">间接推荐人获得的订单实付金额百分比</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">佣金结算周期:</label>
<div class="col-xs-12 col-sm-4">
<input type="text" class="form-control" name="row[fc_dist_settleCycle]" value="{$row.distSettle|htmlentities}" data-rule="required" placeholder="如:T+0、T+1、T+7"/>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">
格式为 <code>T+天数</code>(<code>T</code> 代表好友下单支付当天):<br>
• 填 <code>T+0</code>:<strong>即时结算</strong>,好友付款后佣金立即转为可提现余额;<br>
• 填 <code>T+7</code>:<strong>延后 7 天结算</strong>,付款后先计入“待结算佣金”冻结 7 天(防止恶意退款套现),满 7 天后自动转为可提现余额。
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">最低提现金额:</label>
<div class="col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" min="0" step="0.01" class="form-control" name="row[fc_dist_minWithdraw]" value="{$row.distMinAmount|htmlentities}" data-rule="required;range(0~)"/>
<span class="input-group-addon">元</span>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<span class="help-block">推广员「可提现佣金」达到该金额门槛后,方可在小程序端发起提现申请(填 <code>0</code> 表示无门槛)</span>
</div>
</div>
</div>
</div>
<div class="form-group layer-footer" style="margin-top: 20px;">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed"><i class="fa fa-check"></i> 保存配置</button>
<button type="reset" class="btn btn-default btn-embossed">重置</button>
</div>
</div>
</form>
</div>
</div>