1. 前端个人中心新增真实姓名输入与实名状态展示,支持微信提现核验 2. 后端Auth接口新增真实姓名修改与手机号冲突校验逻辑 3. 后台新增用户详情综合看板,展示佣金、提现、分销等全量数据 4. 优化微信转账逻辑,支持paying状态重试时查询微信单号避免重复创建 5. 新增数据库ALTER脚本同步transfer_status字段结构 6. 新增部署与数据库变更工具脚本,支持线上线下环境同步
482 行
24 KiB
HTML
482 行
24 KiB
HTML
<style>
|
|
.fc-user-detail-page {
|
|
padding: 10px 5px;
|
|
background-color: #f8fafc;
|
|
color: #334155;
|
|
}
|
|
.fc-card {
|
|
background: #ffffff;
|
|
border-radius: 8px;
|
|
border: 1px solid #e2e8f0;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.03);
|
|
margin-bottom: 16px;
|
|
overflow: hidden;
|
|
}
|
|
.fc-card-header {
|
|
padding: 12px 18px;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background-color: #ffffff;
|
|
}
|
|
.fc-card-title {
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
margin: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.fc-card-body {
|
|
padding: 16px 18px;
|
|
}
|
|
.fc-stat-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.fc-stat-card {
|
|
background: #ffffff;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 8px;
|
|
padding: 14px 16px;
|
|
box-shadow: 0 1px 2px rgba(0,0,0,0.02);
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
.fc-stat-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 4px;
|
|
}
|
|
.fc-stat-card.c-green::before { background: #00D26A; }
|
|
.fc-stat-card.c-orange::before { background: #f59e0b; }
|
|
.fc-stat-card.c-blue::before { background: #3b82f6; }
|
|
.fc-stat-card.c-purple::before { background: #8b5cf6; }
|
|
.fc-stat-card.c-teal::before { background: #0d9488; }
|
|
.fc-stat-label {
|
|
font-size: 12px;
|
|
color: #64748b;
|
|
font-weight: 500;
|
|
margin-bottom: 4px;
|
|
}
|
|
.fc-stat-value {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: #0f172a;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
}
|
|
.fc-stat-sub {
|
|
font-size: 11px;
|
|
color: #94a3b8;
|
|
margin-top: 4px;
|
|
}
|
|
.fc-info-table th {
|
|
width: 140px;
|
|
background-color: #f8fafc;
|
|
color: #475569;
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
vertical-align: middle !important;
|
|
border-color: #e2e8f0 !important;
|
|
}
|
|
.fc-info-table td {
|
|
color: #1e293b;
|
|
font-size: 13px;
|
|
vertical-align: middle !important;
|
|
border-color: #e2e8f0 !important;
|
|
}
|
|
.fc-notice-box {
|
|
background-color: #eff6ff;
|
|
border: 1px solid #bfdbfe;
|
|
border-radius: 6px;
|
|
padding: 12px 16px;
|
|
color: #1e40af;
|
|
font-size: 12px;
|
|
line-height: 1.6;
|
|
margin-top: 12px;
|
|
}
|
|
.fc-badge {
|
|
display: inline-block;
|
|
padding: 3px 8px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
border-radius: 4px;
|
|
}
|
|
.fc-badge-success { background: #dcfce7; color: #15803d; }
|
|
.fc-badge-warning { background: #fef3c7; color: #b45309; }
|
|
.fc-badge-gray { background: #f1f5f9; color: #64748b; }
|
|
.fc-badge-info { background: #e0f2fe; color: #0369a1; }
|
|
</style>
|
|
|
|
<div class="fc-user-detail-page">
|
|
|
|
<!-- 顶部用户基本概览栏 -->
|
|
<div class="fc-card" style="border-left: 4px solid #00D26A;">
|
|
<div class="fc-card-body" style="padding: 16px 20px;">
|
|
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px;">
|
|
<div style="display: flex; align-items: center; gap: 16px;">
|
|
<img src="{$userInfo.avatar|default='/assets/img/avatar.png'}" style="width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.05);">
|
|
<div>
|
|
<div style="display: flex; align-items: center; gap: 8px;">
|
|
<span style="font-size: 18px; font-weight: 700; color: #0f172a;">{$userInfo.nickname|default='未设置昵称'}</span>
|
|
<span class="fc-badge fc-badge-info">UID: {$row.user_id}</span>
|
|
{if condition="$row.user_type == 2"}
|
|
<span class="fc-badge fc-badge-warning"><i class="fa fa-building"></i> 认证商家</span>
|
|
{else /}
|
|
<span class="fc-badge fc-badge-gray"><i class="fa fa-user"></i> 个人用户</span>
|
|
{/if}
|
|
{if condition="!empty($row.is_member)"}
|
|
<span class="fc-badge fc-badge-warning"><i class="fa fa-star"></i> 会员 ({$row.member_level|default='VIP'})</span>
|
|
{/if}
|
|
</div>
|
|
<div style="font-size: 12px; color: #64748b; margin-top: 6px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;">
|
|
<span><i class="fa fa-phone text-muted"></i> 手机号:<strong style="color: #334155;">{$userInfo.mobile|default='未绑定'}</strong></span>
|
|
<span><i class="fa fa-calendar text-muted"></i> 注册时间:{$userInfo.createtime ? datetime($userInfo.createtime) : '-'}</span>
|
|
<span><i class="fa fa-sign-in text-muted"></i> 最后登录:{$userInfo.logintime ? datetime($userInfo.logintime) : '-'} ({$userInfo.loginip|default='-'})</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="display: flex; align-items: center; gap: 10px;">
|
|
<a href="javascript:;" class="btn btn-default btn-sm" onclick="Fast.api.open('fc/userext/edit/ids/{$row.id}', '编辑用户资料', {area:['850px','700px']});"><i class="fa fa-pencil text-primary"></i> 编辑资料</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 核心统计指标网格 -->
|
|
<div class="fc-stat-grid">
|
|
<div class="fc-stat-card c-green">
|
|
<span class="fc-stat-label"><i class="fa fa-money"></i> 账户余额</span>
|
|
<div class="fc-stat-value" style="color: #00A854;">¥{$userInfo.money|default='0.00'}</div>
|
|
<div class="fc-stat-sub">可用于发帖置顶与支付</div>
|
|
</div>
|
|
<div class="fc-stat-card c-orange">
|
|
<span class="fc-stat-label"><i class="fa fa-credit-card"></i> 可提现佣金</span>
|
|
<div class="fc-stat-value" style="color: #f59e0b;">¥{$withdrawable}</div>
|
|
<div class="fc-stat-sub">已结算且未被占用的佣金</div>
|
|
</div>
|
|
<div class="fc-stat-card c-purple">
|
|
<span class="fc-stat-label"><i class="fa fa-check-circle"></i> 累计已提现</span>
|
|
<div class="fc-stat-value" style="color: #8b5cf6;">¥{$withdrawPaidTotal}</div>
|
|
<div class="fc-stat-sub">成功打款至微信零钱总额</div>
|
|
</div>
|
|
<div class="fc-stat-card c-blue">
|
|
<span class="fc-stat-label"><i class="fa fa-line-chart"></i> 分销佣金总额</span>
|
|
<div class="fc-stat-value" style="color: #3b82f6;">¥{$commissionTotal}</div>
|
|
<div class="fc-stat-sub">已结算 ¥{$commissionSettled} / 待结 ¥{$commissionPending}</div>
|
|
</div>
|
|
<div class="fc-stat-card c-teal">
|
|
<span class="fc-stat-label"><i class="fa fa-users"></i> 推广团队下线</span>
|
|
<div class="fc-stat-value" style="color: #0d9488;">{$level1Count + $level2Count} <span style="font-size: 13px; font-weight: normal; color: #64748b;">人</span></div>
|
|
<div class="fc-stat-sub">一级 {$level1Count} 人 | 二级 {$level2Count} 人</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 关键专栏:微信实名认证与提现账户详情 -->
|
|
<div class="fc-card" style="border-top: 3px solid #00D26A;">
|
|
<div class="fc-card-header">
|
|
<h4 class="fc-card-title">
|
|
<i class="fa fa-shield text-success"></i> 微信实名认证与佣金提现账户
|
|
</h4>
|
|
<div>
|
|
{if condition="!empty($row.realname_status)"}
|
|
<span class="fc-badge fc-badge-success"><i class="fa fa-check"></i> 已实名认证</span>
|
|
{else /}
|
|
<span class="fc-badge fc-badge-gray"><i class="fa fa-clock-o"></i> 未实名认证</span>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div class="fc-card-body">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-6">
|
|
<table class="table table-bordered fc-info-table" style="margin-bottom: 0;">
|
|
<tr>
|
|
<th>收款人真实姓名</th>
|
|
<td>
|
|
{if condition="!empty($row.realname)"}
|
|
<span style="font-size: 15px; font-weight: 700; color: #00A854;">
|
|
<i class="fa fa-id-card"></i> {$row.realname}
|
|
</span>
|
|
<span class="label label-success" style="font-size: 10px; margin-left: 6px;">微信核验一致</span>
|
|
{else /}
|
|
<span class="text-danger" style="font-weight: 600;"><i class="fa fa-exclamation-triangle"></i> 未填写收款真实姓名</span>
|
|
<span style="font-size: 11px; color: #94a3b8; margin-left: 4px;">(暂无法发起微信转账)</span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>实名认证状态</th>
|
|
<td>
|
|
{if condition="!empty($row.realname_status)"}
|
|
<span class="text-success font-bold"><i class="fa fa-check-circle"></i> 已认证 (提现受微信校验保护)</span>
|
|
{else /}
|
|
<span class="text-muted"><i class="fa fa-times-circle"></i> 未认证</span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-md-6">
|
|
<table class="table table-bordered fc-info-table" style="margin-bottom: 0;">
|
|
<tr>
|
|
<th>微信收款标识 (OpenID)</th>
|
|
<td>
|
|
{if condition="!empty($row.openid)"}
|
|
<code style="color: #0369a1; background: #e0f2fe; padding: 2px 6px; border-radius: 4px;">{$row.openid}</code>
|
|
{else /}
|
|
<span class="text-warning"><i class="fa fa-unlink"></i> 未绑定微信OpenID</span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>微信商家转账状态</th>
|
|
<td>
|
|
{if condition="!empty($row.openid) && !empty($row.realname)"}
|
|
<span class="text-success"><i class="fa fa-check-circle"></i> 资料完备,支持零钱直连打款</span>
|
|
{else /}
|
|
<span class="text-danger"><i class="fa fa-warning"></i> 缺少{if condition="empty($row.realname)"}真实姓名{else /}OpenID{/if},提现需先完善</span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 规则机制解答盒 -->
|
|
<div class="fc-notice-box">
|
|
<div style="font-weight: 700; margin-bottom: 4px; font-size: 13px;">
|
|
<i class="fa fa-lightbulb-o text-warning"></i> 佣金提现与实名机制说明:
|
|
</div>
|
|
<div style="padding-left: 18px;">
|
|
<div>1. <strong>提现时如何实名</strong>:当用户在小程序端【分销推广中心 -> 申请提现】时,若此前未录入收款人真实姓名,系统会主动弹出输入框要求用户填写「收款人真实姓名(需与微信实名一致)」。用户提交后,系统自动调用实名接口并保存为本处的「真实姓名」,同时将实名状态标记为「已实名」。后续提现自动沿用,无需用户再次填写。</div>
|
|
<div>2. <strong>后台录入与核对</strong>:管理员可在当前页面右上角的【编辑资料】弹窗中,直接查看、录入或修正用户的真实姓名与实名状态。</div>
|
|
<div>3. <strong>微信转账强校验</strong>:系统通过微信支付「商家转账到零钱」进行佣金结算打款时,微信官方接口会强行比对用户微信支付的真实姓名与后台提交的真实姓名。两相一致方可划款成功;若不一致,转账失败且资金不扣减。</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 会员与分销两栏布局 -->
|
|
<div class="row">
|
|
<!-- 会员权益与配额 -->
|
|
<div class="col-xs-12 col-md-6">
|
|
<div class="fc-card" style="height: calc(100% - 16px);">
|
|
<div class="fc-card-header">
|
|
<h4 class="fc-card-title"><i class="fa fa-diamond text-warning"></i> 会员权益与发布配额</h4>
|
|
</div>
|
|
<div class="fc-card-body">
|
|
<table class="table table-bordered fc-info-table" style="margin-bottom: 0;">
|
|
<tr>
|
|
<th>会员状态</th>
|
|
<td>
|
|
{if condition="!empty($row.is_member)"}
|
|
<span class="fc-badge fc-badge-warning"><i class="fa fa-star"></i> 会员</span>
|
|
{else /}
|
|
<span class="fc-badge fc-badge-gray">普通用户</span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>会员等级</th>
|
|
<td>{$row.member_level|default='-'}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>会员到期时间</th>
|
|
<td>
|
|
{if condition="!empty($row.member_expiretime)"}
|
|
{$row.member_expiretime|datetime}
|
|
{if condition="$row.member_expiretime < time()"}
|
|
<span class="label label-danger">已过期</span>
|
|
{else /}
|
|
<span class="label label-success">有效</span>
|
|
{/if}
|
|
{else /}
|
|
-
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>赠送发帖配额</th>
|
|
<td>
|
|
剩余 <strong>{$row.post_quota_left|default=0}</strong> 条
|
|
{if condition="!empty($row.post_quota_expire)"}
|
|
<span class="text-muted" style="font-size: 11px;">(有效期至: {$row.post_quota_expire|datetime})</span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>查电话免费额度</th>
|
|
<td>
|
|
今日已用 <strong>{$row.free_view_used|default=0}</strong> / 每日额度 {$row.free_view_quota|default=20} 次
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 推广分销与团队绑定 -->
|
|
<div class="col-xs-12 col-md-6">
|
|
<div class="fc-card" style="height: calc(100% - 16px);">
|
|
<div class="fc-card-header">
|
|
<h4 class="fc-card-title"><i class="fa fa-sitemap text-primary"></i> 推广邀请与团队上下级</h4>
|
|
</div>
|
|
<div class="fc-card-body">
|
|
<table class="table table-bordered fc-info-table" style="margin-bottom: 0;">
|
|
<tr>
|
|
<th>专属邀请码</th>
|
|
<td>
|
|
<strong style="font-size: 15px; color: #2563eb; letter-spacing: 1px;">{$row.invite_code|default='-'}</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>上级推荐人</th>
|
|
<td>
|
|
{if condition="!empty($inviterUser)"}
|
|
<div style="display: flex; align-items: center; gap: 8px;">
|
|
<img src="{$inviterUser.avatar|default='/assets/img/avatar.png'}" style="width: 24px; height: 24px; border-radius: 50%;">
|
|
<strong>{$inviterUser.nickname|default='-'}</strong>
|
|
<span class="text-muted">(UID: {$inviterUser.id})</span>
|
|
<span class="text-muted"><i class="fa fa-phone"></i> {$inviterUser.mobile|default='-'}</span>
|
|
</div>
|
|
{else /}
|
|
<span class="text-muted">无上级邀请人 (根用户)</span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>团队规模</th>
|
|
<td>
|
|
一级下线:<strong>{$level1Count}</strong> 人
|
|
<span style="margin: 0 6px; color: #cbd5e1;">|</span>
|
|
二级下线:<strong>{$level2Count}</strong> 人
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>累计发布信息</th>
|
|
<td>{$postCount} 条同城信息</td>
|
|
</tr>
|
|
<tr>
|
|
<th>累计平台消费</th>
|
|
<td>{$orderCount} 笔支付订单 (共 ¥{$orderSpend})</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 近期提现记录与佣金流水 -->
|
|
<div class="row">
|
|
<!-- 最近 5 笔提现 -->
|
|
<div class="col-xs-12 col-md-6">
|
|
<div class="fc-card">
|
|
<div class="fc-card-header">
|
|
<h4 class="fc-card-title"><i class="fa fa-history text-muted"></i> 近期提现申请 (最近5笔)</h4>
|
|
</div>
|
|
<div class="fc-card-body" style="padding: 0;">
|
|
<table class="table table-striped table-hover" style="margin-bottom: 0; font-size: 12px;">
|
|
<thead>
|
|
<tr style="background: #f8fafc; color: #64748b;">
|
|
<th>单号</th>
|
|
<th>金额</th>
|
|
<th>渠道</th>
|
|
<th>状态</th>
|
|
<th>申请时间</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{volist name="recentWithdraws" id="w"}
|
|
<tr>
|
|
<td><code style="font-size: 11px;">{$w.withdraw_no}</code></td>
|
|
<td><strong style="color: #f59e0b;">¥{$w.amount}</strong></td>
|
|
<td>
|
|
{if condition="$w.channel == 'wxpay'"}
|
|
<span class="text-success"><i class="fa fa-wechat"></i> 微信零钱</span>
|
|
{else /}
|
|
{$w.channel}
|
|
{/if}
|
|
</td>
|
|
<td>
|
|
{switch name="w.status"}
|
|
{case value="auditing"}<span class="label label-warning">待审核</span>{/case}
|
|
{case value="paying"}<span class="label label-info">转账中</span>{/case}
|
|
{case value="paid"}<span class="label label-success">已到账</span>{/case}
|
|
{case value="rejected"}<span class="label label-danger">已驳回</span>{/case}
|
|
{default /}<span class="label label-default">{$w.status}</span>
|
|
{/switch}
|
|
</td>
|
|
<td>{$w.createtime|datetime}</td>
|
|
</tr>
|
|
{/volist}
|
|
{if condition="empty($recentWithdraws)"}
|
|
<tr>
|
|
<td colspan="5" class="text-center text-muted" style="padding: 18px 0;">暂无提现记录</td>
|
|
</tr>
|
|
{/if}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 最近 5 笔佣金明细 -->
|
|
<div class="col-xs-12 col-md-6">
|
|
<div class="fc-card">
|
|
<div class="fc-card-header">
|
|
<h4 class="fc-card-title"><i class="fa fa-exchange text-muted"></i> 近期分销佣金明细 (最近5笔)</h4>
|
|
</div>
|
|
<div class="fc-card-body" style="padding: 0;">
|
|
<table class="table table-striped table-hover" style="margin-bottom: 0; font-size: 12px;">
|
|
<thead>
|
|
<tr style="background: #f8fafc; color: #64748b;">
|
|
<th>单号</th>
|
|
<th>来源下线</th>
|
|
<th>佣金</th>
|
|
<th>分佣比</th>
|
|
<th>结算状态</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{volist name="recentCommissions" id="c"}
|
|
<tr>
|
|
<td><code style="font-size: 11px;">{$c.order_no}</code></td>
|
|
<td>{$c.from_nickname|default=('UID:'.$c.from_user_id)}</td>
|
|
<td><strong style="color: #00A854;">+¥{$c.amount}</strong></td>
|
|
<td>{$c.rate}%</td>
|
|
<td>
|
|
{if condition="$c.status == 1"}
|
|
<span class="label label-success">已结算</span>
|
|
{elseif condition="$c.status == 0" /}
|
|
<span class="label label-warning">待结算</span>
|
|
{else /}
|
|
<span class="label label-danger">已失效</span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
{/volist}
|
|
{if condition="empty($recentCommissions)"}
|
|
<tr>
|
|
<td colspan="5" class="text-center text-muted" style="padding: 18px 0;">暂无佣金明细</td>
|
|
</tr>
|
|
{/if}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|