feat: 新增用户真实姓名与实名认证功能,优化后台用户管理
1. 前端个人中心新增真实姓名输入与实名状态展示,支持微信提现核验 2. 后端Auth接口新增真实姓名修改与手机号冲突校验逻辑 3. 后台新增用户详情综合看板,展示佣金、提现、分销等全量数据 4. 优化微信转账逻辑,支持paying状态重试时查询微信单号避免重复创建 5. 新增数据库ALTER脚本同步transfer_status字段结构 6. 新增部署与数据库变更工具脚本,支持线上线下环境同步
这个提交包含在:
@@ -70,6 +70,7 @@ class MchTransferShortcut implements ShortcutInterface
|
||||
return [
|
||||
StartPlugin::class,
|
||||
QueryPlugin::class,
|
||||
AddPayloadBodyPlugin::class,
|
||||
AddPayloadSignaturePlugin::class,
|
||||
AddRadarPlugin::class,
|
||||
VerifySignaturePlugin::class,
|
||||
@@ -83,6 +84,7 @@ class MchTransferShortcut implements ShortcutInterface
|
||||
return [
|
||||
StartPlugin::class,
|
||||
\Yansongda\Pay\Plugin\Wechat\V3\Marketing\MchTransfer\CancelPlugin::class,
|
||||
AddPayloadBodyPlugin::class,
|
||||
AddPayloadSignaturePlugin::class,
|
||||
AddRadarPlugin::class,
|
||||
VerifySignaturePlugin::class,
|
||||
|
||||
@@ -4,11 +4,13 @@ namespace app\admin\controller\fc;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
|
||||
/**
|
||||
* 同城-用户扩展
|
||||
* 同城-用户扩展与用户管理控制器
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
* @icon fa fa-user-circle
|
||||
*/
|
||||
class Userext extends Backend
|
||||
{
|
||||
@@ -19,19 +21,26 @@ class Userext extends Backend
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
/**
|
||||
* 无需鉴权的公开方法(详情弹窗开放给后台已登录管理角色查看)
|
||||
*/
|
||||
protected $noNeedRight = ['detail'];
|
||||
|
||||
/**
|
||||
* 控制器初始化
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\FcUserExt;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员列表(关联 fa_user 展示昵称 / 手机号 / 账户余额)
|
||||
* 会员列表(关联 fa_user 展示昵称 / 手机号 / 账户余额 / 真实姓名)
|
||||
*
|
||||
* 说明:余额money 存放在核心表 fa_user,本表只有业务扩展字段,
|
||||
* 因此列表需要 JOIN fa_user 才能看出「谁有多少余额」。
|
||||
* 注意 TP5.0 的 count() 会清空查询条件,必须分别构建查询。
|
||||
* @return string|\think\response\Json
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
@@ -56,21 +65,238 @@ class Userext extends Backend
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户详细信息综合看板(包含基本资料、实名信息、微信提现账户、分销佣金、会员特权及近期提现记录)
|
||||
*
|
||||
* @param int|null $ids 用户扩展记录ID
|
||||
* @return string
|
||||
*/
|
||||
public function detail($ids = null)
|
||||
{
|
||||
$id = $ids ? $ids : $this->request->param('ids');
|
||||
$row = $this->model->get($id);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
|
||||
$userId = (int)$row['user_id'];
|
||||
|
||||
// 1. 主表 fa_user 用户基本信息
|
||||
$user = Db::name('user')->where('id', $userId)->find();
|
||||
if (!$user) {
|
||||
$user = [
|
||||
'id' => $userId,
|
||||
'nickname' => '未注册用户',
|
||||
'mobile' => '-',
|
||||
'avatar' => '',
|
||||
'money' => '0.00',
|
||||
'score' => 0,
|
||||
'createtime' => null,
|
||||
'logintime' => null,
|
||||
'loginip' => '',
|
||||
];
|
||||
}
|
||||
|
||||
// 2. 上级邀请人信息
|
||||
$inviterUser = null;
|
||||
if (!empty($row['inviter_id'])) {
|
||||
$inviterUser = Db::name('user')
|
||||
->where('id', (int)$row['inviter_id'])
|
||||
->field('id,nickname,mobile,avatar')
|
||||
->find();
|
||||
}
|
||||
|
||||
// 3. 分销与佣金统计
|
||||
$commissionTotal = (float)Db::name('fc_commission')
|
||||
->where('user_id', $userId)
|
||||
->where('status', '<>', 2)
|
||||
->sum('amount');
|
||||
|
||||
$commissionSettled = (float)Db::name('fc_commission')
|
||||
->where('user_id', $userId)
|
||||
->where('status', 1)
|
||||
->sum('amount');
|
||||
|
||||
$commissionPending = (float)Db::name('fc_commission')
|
||||
->where('user_id', $userId)
|
||||
->where('status', 0)
|
||||
->sum('amount');
|
||||
|
||||
// 累计已成功提现金额
|
||||
$withdrawPaidTotal = (float)Db::name('fc_withdraw')
|
||||
->where('user_id', $userId)
|
||||
->where('status', 'paid')
|
||||
->sum('amount');
|
||||
|
||||
// 已占用提现金额(包含审核中、转账中、已打款)
|
||||
$withdrawAppliedTotal = (float)Db::name('fc_withdraw')
|
||||
->where('user_id', $userId)
|
||||
->where('status', 'in', ['auditing', 'paying', 'paid'])
|
||||
->sum('amount');
|
||||
|
||||
// 当前剩余可提现金额
|
||||
$withdrawable = max(0, $commissionSettled - $withdrawAppliedTotal);
|
||||
|
||||
// 下级团队人数统计(一级、二级)
|
||||
$level1Count = (int)Db::name('fc_dist_relation')
|
||||
->where('parent_id', $userId)
|
||||
->where('level', 1)
|
||||
->count();
|
||||
|
||||
$level2Count = (int)Db::name('fc_dist_relation')
|
||||
->where('parent_id', $userId)
|
||||
->where('level', 2)
|
||||
->count();
|
||||
|
||||
// 4. 业务数据概览(发帖数与消费订单数)
|
||||
$postCount = (int)Db::name('fc_post')->where('user_id', $userId)->count();
|
||||
$orderCount = (int)Db::name('fc_order')->where('user_id', $userId)->where('status', 'paid')->count();
|
||||
$orderSpend = (float)Db::name('fc_order')->where('user_id', $userId)->where('status', 'paid')->sum('amount');
|
||||
|
||||
// 5. 最近 5 笔提现记录
|
||||
$recentWithdraws = Db::name('fc_withdraw')
|
||||
->where('user_id', $userId)
|
||||
->order('id', 'desc')
|
||||
->limit(5)
|
||||
->select();
|
||||
|
||||
// 6. 最近 5 笔佣金明细
|
||||
$recentCommissions = Db::name('fc_commission')->alias('c')
|
||||
->join('user fu', 'fu.id = c.from_user_id', 'LEFT')
|
||||
->where('c.user_id', $userId)
|
||||
->field('c.*, fu.nickname as from_nickname')
|
||||
->order('c.id', 'desc')
|
||||
->limit(5)
|
||||
->select();
|
||||
|
||||
$this->view->assign([
|
||||
'row' => $row,
|
||||
'userInfo' => $user,
|
||||
'inviterUser' => $inviterUser,
|
||||
'commissionTotal' => round($commissionTotal, 2),
|
||||
'commissionSettled' => round($commissionSettled, 2),
|
||||
'commissionPending' => round($commissionPending, 2),
|
||||
'withdrawPaidTotal' => round($withdrawPaidTotal, 2),
|
||||
'withdrawable' => round($withdrawable, 2),
|
||||
'level1Count' => $level1Count,
|
||||
'level2Count' => $level2Count,
|
||||
'postCount' => $postCount,
|
||||
'orderCount' => $orderCount,
|
||||
'orderSpend' => round($orderSpend, 2),
|
||||
'recentWithdraws' => $recentWithdraws,
|
||||
'recentCommissions' => $recentCommissions,
|
||||
]);
|
||||
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑用户扩展资料(包含实名姓名、会员等级、发帖额度等)
|
||||
*
|
||||
* @param int|null $ids 用户扩展记录ID
|
||||
* @return string
|
||||
*/
|
||||
public function edit($ids = null)
|
||||
{
|
||||
$id = $ids ? $ids : $this->request->param('ids');
|
||||
$row = $this->model->get($id);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
|
||||
if ($this->request->isPost()) {
|
||||
$params = $this->request->post('row/a');
|
||||
if ($params) {
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
// 1. 真实姓名与实名状态清洗
|
||||
if (isset($params['realname'])) {
|
||||
$params['realname'] = trim((string)$params['realname']);
|
||||
}
|
||||
if (isset($params['realname_status'])) {
|
||||
$params['realname_status'] = (int)$params['realname_status'] === 1 ? 1 : 0;
|
||||
}
|
||||
|
||||
// 2. 用户身份(1: 个人用户, 2: 商家)
|
||||
if (isset($params['user_type'])) {
|
||||
$params['user_type'] = (int)$params['user_type'] === 2 ? 2 : 1;
|
||||
}
|
||||
|
||||
// 3. 会员状态与到期时间处理
|
||||
if (isset($params['is_member'])) {
|
||||
$params['is_member'] = (int)$params['is_member'] === 1 ? 1 : 0;
|
||||
}
|
||||
if (isset($params['member_expiretime'])) {
|
||||
$expire = trim((string)$params['member_expiretime']);
|
||||
$params['member_expiretime'] = $expire !== '' ? (is_numeric($expire) ? (int)$expire : strtotime($expire)) : null;
|
||||
}
|
||||
|
||||
// 4. 发帖配额及到期时间处理
|
||||
if (isset($params['post_quota_left'])) {
|
||||
$params['post_quota_left'] = max(0, (int)$params['post_quota_left']);
|
||||
}
|
||||
if (isset($params['post_quota_expire'])) {
|
||||
$expire = trim((string)$params['post_quota_expire']);
|
||||
$params['post_quota_expire'] = $expire !== '' ? (is_numeric($expire) ? (int)$expire : strtotime($expire)) : null;
|
||||
}
|
||||
|
||||
// 5. 免费电话查看配额处理
|
||||
if (isset($params['free_view_quota'])) {
|
||||
$params['free_view_quota'] = max(0, (int)$params['free_view_quota']);
|
||||
}
|
||||
if (isset($params['free_view_used'])) {
|
||||
$params['free_view_used'] = max(0, (int)$params['free_view_used']);
|
||||
}
|
||||
|
||||
// 6. 邀请人处理(避免自身成为自身邀请人)
|
||||
if (isset($params['inviter_id'])) {
|
||||
$inviterId = (int)$params['inviter_id'];
|
||||
if ($inviterId > 0 && $inviterId === (int)$row['user_id']) {
|
||||
$this->error('上级邀请人不能设置为当前用户本人');
|
||||
}
|
||||
$params['inviter_id'] = $inviterId;
|
||||
}
|
||||
|
||||
Db::startTrans();
|
||||
try {
|
||||
$row->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
} catch (PDOException $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
$this->success('更新成功');
|
||||
}
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
|
||||
// 关联主表用户信息
|
||||
$userInfo = Db::name('user')->where('id', (int)$row['user_id'])->find();
|
||||
$inviterInfo = null;
|
||||
if (!empty($row['inviter_id'])) {
|
||||
$inviterInfo = Db::name('user')->where('id', (int)$row['inviter_id'])->field('id,nickname,mobile')->find();
|
||||
}
|
||||
|
||||
$this->view->assign([
|
||||
'row' => $row,
|
||||
'userInfo' => $userInfo ?: [],
|
||||
'inviterInfo' => $inviterInfo,
|
||||
]);
|
||||
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 余额充值(给选中用户增加账户余额)
|
||||
*
|
||||
* POST /s.php/fc/userext/recharge
|
||||
* 入参:{ ids: '1001,1002' , amount: 100, remark?: '备注' }
|
||||
*
|
||||
* 说明:
|
||||
* 余额存放在核心表 fa_user.money,本表(fc_user_ext)仅作业务扩展,
|
||||
* 因此这里按 user_id 关联 fa_user 进行加减。
|
||||
* 【注意】ids 必须是 fa_user.id(即本表的 user_id 字段),
|
||||
* 不能传 fc_user_ext.id,否则会充错人(或报「未找到对应用户」)。
|
||||
* 为可追溯,每次充值同时写入 fa_fc_finance_flow(资金流水)与
|
||||
* fa_fc_message(站内通知),后台操作留痕由 Backend 自动记录。
|
||||
*/
|
||||
public function recharge()
|
||||
{
|
||||
@@ -166,10 +392,4 @@ class Userext extends Backend
|
||||
}
|
||||
$this->success($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -203,9 +203,9 @@ class Withdraw extends Backend
|
||||
$this->success('驳回成功(' . $done . ' 条)');
|
||||
}
|
||||
|
||||
// 通过 → 逐笔发起微信商家转账(外部调用不能放在事务里)
|
||||
// 通过 → 逐笔发起微信商家转账(支持 auditing 与 paying 重试,外部调用不能放在事务里)
|
||||
foreach ($withdraws as $withdraw) {
|
||||
if ((string)$withdraw['status'] !== 'auditing') {
|
||||
if (!in_array((string)$withdraw['status'], ['auditing', 'paying'], true)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
<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>
|
||||
@@ -1,75 +1,211 @@
|
||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" min="0" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||
<!-- 用户基本信息卡片(只读展示) -->
|
||||
<div class="panel panel-default" style="margin-bottom: 18px; border-left: 4px solid #18bc9c; background-color: #fcfdfd;">
|
||||
<div class="panel-body" style="padding: 12px 18px;">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="{$userInfo.avatar|default='/assets/img/avatar.png'}" style="width: 46px; height: 46px; border-radius: 50%; border: 1px solid #d2d6de; object-fit: cover; margin-right: 12px;">
|
||||
<div>
|
||||
<div style="font-size: 15px; font-weight: 600; color: #2c3e50;">
|
||||
{$userInfo.nickname|default='未设置昵称'}
|
||||
<span class="label label-info" style="font-size: 11px; margin-left: 4px;">UID: {$row.user_id}</span>
|
||||
</div>
|
||||
<div style="font-size: 12px; color: #7f8c8d; margin-top: 3px;">
|
||||
<i class="fa fa-phone"></i> {$userInfo.mobile|default='未绑定手机'}
|
||||
<span style="margin: 0 8px;">|</span>
|
||||
<i class="fa fa-clock-o"></i> 注册于:{if condition="!empty($userInfo.createtime)"}{$userInfo.createtime|datetime}{else /}-{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<span style="font-size: 12px; color: #7f8c8d;">账户钱包余额</span>
|
||||
<div style="font-size: 18px; font-weight: bold; color: #e67e22;">¥{$userInfo.money|default='0.00'}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Openid')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-openid" data-rule="required" class="form-control" name="row[openid]" type="text" value="{$row.openid|htmlentities}">
|
||||
|
||||
<!-- 用户身份与微信实名板块 -->
|
||||
<div class="box box-solid box-default" style="border: 1px solid #e7ecf1; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 15px;">
|
||||
<div class="box-header with-border" style="background-color: #f7fafc; padding: 10px 15px;">
|
||||
<h3 class="box-title" style="font-size: 14px; font-weight: 600; color: #34495e;">
|
||||
<i class="fa fa-id-card text-success"></i> 身份与微信实名(佣金提现核验)
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body" style="padding-top: 15px;">
|
||||
|
||||
<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>
|
||||
<input type="radio" name="row[user_type]" value="1" {if condition="$row.user_type != 2"}checked{/if}>
|
||||
<span class="label label-primary"><i class="fa fa-user"></i> 个人用户</span>
|
||||
</label>
|
||||
<label style="margin-left: 20px;">
|
||||
<input type="radio" name="row[user_type]" value="2" {if condition="$row.user_type == 2"}checked{/if}>
|
||||
<span class="label label-warning"><i class="fa fa-building"></i> 认证商家</span>
|
||||
</label>
|
||||
</div>
|
||||
<span class="help-block"><i class="fa fa-info-circle"></i> 认证商家拥有专属商户主页及特定发布特权。</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2"><span class="text-danger">*</span> 真实姓名:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-realname" class="form-control" name="row[realname]" type="text" value="{$row.realname|default=''|htmlentities}" placeholder="请输入收款人真实姓名(如:张三)">
|
||||
<div style="margin-top: 6px; font-size: 12px; color: #8a6d3b; background-color: #fcf8e3; padding: 6px 10px; border-radius: 4px; border: 1px solid #faebcc;">
|
||||
<i class="fa fa-shield"></i> <strong>提现说明</strong>:分销佣金提现经微信「商家转账到零钱」接口打款时,微信会强校验此姓名与微信支付实名是否完全一致。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<input type="radio" name="row[realname_status]" value="0" {if condition="empty($row.realname_status)"}checked{/if}>
|
||||
<span class="text-muted"><i class="fa fa-times-circle"></i> 未实名</span>
|
||||
</label>
|
||||
<label style="margin-left: 20px;">
|
||||
<input type="radio" name="row[realname_status]" value="1" {if condition="!empty($row.realname_status)"}checked{/if}>
|
||||
<span class="text-success" style="font-weight: 600;"><i class="fa fa-check-circle"></i> 已实名认证</span>
|
||||
</label>
|
||||
</div>
|
||||
<span class="help-block text-muted">用户首次在小程序提现时填写姓名会自动认证;管理员在此修改也会同步生效。</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">微信 OpenID:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-openid" class="form-control" name="row[openid]" type="text" value="{$row.openid|default=''|htmlentities}" placeholder="微信小程序用户唯一标识">
|
||||
<span class="help-block text-muted">微信小程序用户标识,商家转账直接转入此微信绑定零钱账户。</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_type" data-rule="required" class="form-control" name="row[user_type]" type="number" value="{$row.user_type|htmlentities}">
|
||||
|
||||
<!-- 会员权益与配额板块 -->
|
||||
<div class="box box-solid box-default" style="border: 1px solid #e7ecf1; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 15px;">
|
||||
<div class="box-header with-border" style="background-color: #f7fafc; padding: 10px 15px;">
|
||||
<h3 class="box-title" style="font-size: 14px; font-weight: 600; color: #34495e;">
|
||||
<i class="fa fa-diamond text-warning"></i> 会员特权与配额配置
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body" style="padding-top: 15px;">
|
||||
|
||||
<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>
|
||||
<input type="radio" name="row[is_member]" value="0" {if condition="empty($row.is_member)"}checked{/if}>
|
||||
<span>否</span>
|
||||
</label>
|
||||
<label style="margin-left: 20px;">
|
||||
<input type="radio" name="row[is_member]" value="1" {if condition="!empty($row.is_member)"}checked{/if}>
|
||||
<span class="text-warning font-bold"><i class="fa fa-star"></i> 会员</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">会员等级:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-member_level" class="form-control" name="row[member_level]" type="text" value="{$row.member_level|default=''|htmlentities}" placeholder="例如:月卡会员 / 年卡会员 / VIP商家">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">会员到期时间:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-member_expiretime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[member_expiretime]" type="text" value="{if condition="!empty($row.member_expiretime)"}{$row.member_expiretime|datetime}{/if}" placeholder="留空表示无到期时间限制">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">剩余发布条数:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-post_quota_left" class="form-control" name="row[post_quota_left]" type="number" min="0" value="{$row.post_quota_left|default=0}">
|
||||
<span class="help-block text-muted">会员套餐赠送或后台特别分配的免费发帖额度。</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-8">
|
||||
<input id="c-post_quota_expire" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[post_quota_expire]" type="text" value="{if condition="!empty($row.post_quota_expire)"}{$row.post_quota_expire|datetime}{/if}" placeholder="到期后额外发布额度清零">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">每日配额</span>
|
||||
<input id="c-free_view_quota" class="form-control" name="row[free_view_quota]" type="number" min="0" value="{$row.free_view_quota|default=20}">
|
||||
<span class="input-group-addon">次</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">今日已用</span>
|
||||
<input id="c-free_view_used" class="form-control" name="row[free_view_used]" type="number" min="0" value="{$row.free_view_used|default=0}">
|
||||
<span class="input-group-addon">次</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Realname_status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-realname_status" data-rule="required" class="form-control" name="row[realname_status]" type="number" value="{$row.realname_status|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Is_member')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-is_member" data-rule="required" class="form-control" name="row[is_member]" type="number" value="{$row.is_member|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Member_level')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-member_level" data-rule="required" class="form-control" name="row[member_level]" type="text" value="{$row.member_level|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Member_expiretime')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-member_expiretime" class="form-control" name="row[member_expiretime]" type="number" value="{$row.member_expiretime|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invite_code')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invite_code" data-rule="required" class="form-control" name="row[invite_code]" type="text" value="{$row.invite_code|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Inviter_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-inviter_id" min="0" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[inviter_id]" type="text" value="{$row.inviter_id|htmlentities}" placeholder="不填写表示无邀请人">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Free_view_date')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-free_view_date" data-rule="required" class="form-control" name="row[free_view_date]" type="text" value="{$row.free_view_date|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Free_view_used')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-free_view_used" data-rule="required" class="form-control" name="row[free_view_used]" type="number" value="{$row.free_view_used|htmlentities}">
|
||||
|
||||
<!-- 推广与分销绑定板块 -->
|
||||
<div class="box box-solid box-default" style="border: 1px solid #e7ecf1; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 15px;">
|
||||
<div class="box-header with-border" style="background-color: #f7fafc; padding: 10px 15px;">
|
||||
<h3 class="box-title" style="font-size: 14px; font-weight: 600; color: #34495e;">
|
||||
<i class="fa fa-sitemap text-primary"></i> 推广邀请与上下级关系
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body" style="padding-top: 15px;">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">邀请码:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invite_code" data-rule="required" class="form-control" name="row[invite_code]" type="text" value="{$row.invite_code|htmlentities}">
|
||||
<span class="help-block text-muted">该用户专属的分销邀请码,新用户扫码或绑定此码即可成为其下线。</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-8">
|
||||
<input id="c-inviter_id" min="0" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[inviter_id]" type="text" value="{$row.inviter_id|htmlentities}" placeholder="不填写表示无邀请人">
|
||||
{if condition="!empty($inviterInfo)"}
|
||||
<span class="help-block text-info">
|
||||
<i class="fa fa-user"></i> 当前上级:<strong>{$inviterInfo.nickname|default='-'}</strong> (手机号: {$inviterInfo.mobile|default='-'})
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group layer-footer">
|
||||
<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-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled"><i class="fa fa-check"></i> {:__('OK')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed"><i class="fa fa-reply"></i> {:__('Reset')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -70,6 +70,37 @@ class Auth extends V1
|
||||
$ext = Db::name('fc_user_ext')->where('openid', $openid)->find();
|
||||
$user = $ext ? Db::name('user')->where('id', $ext['user_id'])->find() : null;
|
||||
|
||||
// 跨端归一:若按 openid 未查到,但带有手机号,且系统中已存在该手机号用户,则直接归一绑定微信,避免重复建号
|
||||
if (!$user && $phone !== '') {
|
||||
$existUser = Db::name('user')->where('mobile', $phone)->find();
|
||||
if ($existUser) {
|
||||
$user = $existUser;
|
||||
$existExt = Db::name('fc_user_ext')->where('user_id', $user['id'])->find();
|
||||
if ($existExt) {
|
||||
Db::name('fc_user_ext')->where('user_id', $user['id'])->update([
|
||||
'openid' => $openid,
|
||||
'updatetime' => time(),
|
||||
]);
|
||||
} else {
|
||||
Db::name('fc_user_ext')->insert([
|
||||
'user_id' => $user['id'],
|
||||
'openid' => $openid,
|
||||
'user_type' => 1,
|
||||
'realname_status' => 0,
|
||||
'is_member' => 0,
|
||||
'member_level' => '',
|
||||
'member_expiretime' => null,
|
||||
'invite_code' => strtoupper(substr(md5('fc' . $user['id']), 0, 6)),
|
||||
'inviter_id' => 0,
|
||||
'free_view_date' => date('Y-m-d'),
|
||||
'free_view_used' => 0,
|
||||
'createtime' => time(),
|
||||
'updatetime' => time(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$user) {
|
||||
// 首次登录:自动建号(有微信昵称/头像就落库,否则用占位昵称 + 字母头像)
|
||||
$uid = Db::name('user')->insertGetId([
|
||||
@@ -153,6 +184,10 @@ class Auth extends V1
|
||||
if (!preg_match('/^1\d{10}$/', $phone)) {
|
||||
$this->fail('手机号格式不正确');
|
||||
}
|
||||
$conflict = Db::name('user')->where('mobile', $phone)->where('id', '<>', $user['id'])->find();
|
||||
if ($conflict) {
|
||||
$this->fail('该手机号已被其他账号绑定,请勿重复使用');
|
||||
}
|
||||
Db::name('user')->where('id', $user['id'])->update([
|
||||
'mobile' => $phone, 'updatetime' => time(),
|
||||
]);
|
||||
@@ -183,6 +218,11 @@ class Auth extends V1
|
||||
$this->fail($e->getMessage() ?: '微信手机号获取失败,请改用手动输入');
|
||||
}
|
||||
|
||||
$conflict = Db::name('user')->where('mobile', $phone)->where('id', '<>', $user['id'])->find();
|
||||
if ($conflict) {
|
||||
$this->fail('该手机号已被其他账号绑定,请勿重复使用');
|
||||
}
|
||||
|
||||
Db::name('user')->where('id', $user['id'])->update([
|
||||
'mobile' => $phone, 'updatetime' => time(),
|
||||
]);
|
||||
@@ -277,6 +317,7 @@ class Auth extends V1
|
||||
if ($this->request->isPost()) {
|
||||
$nickname = trim((string)$this->input('nickname', ''));
|
||||
$avatar = trim((string)$this->input('avatar', ''));
|
||||
$realname = trim((string)$this->input('realname', ''));
|
||||
$update = [];
|
||||
if ($nickname !== '') {
|
||||
if (mb_strlen($nickname) > 32) {
|
||||
@@ -287,12 +328,27 @@ class Auth extends V1
|
||||
if ($avatar !== '') {
|
||||
$update['avatar'] = $avatar;
|
||||
}
|
||||
if (!$update) {
|
||||
if ($update) {
|
||||
$update['updatetime'] = time();
|
||||
Db::name('user')->where('id', $user['id'])->update($update);
|
||||
$user = Db::name('user')->where('id', $user['id'])->find();
|
||||
}
|
||||
|
||||
// 支持在个人资料中直接修改真实姓名(用于提现微信核验)
|
||||
if ($realname !== '') {
|
||||
if (!preg_match('/^[\x{4e00}-\x{9fa5}·]{2,20}$/u', $realname)) {
|
||||
$this->fail('请填写 2-20 位中文真实姓名');
|
||||
}
|
||||
Db::name('fc_user_ext')->where('user_id', $user['id'])->update([
|
||||
'realname' => $realname,
|
||||
'realname_status' => 1,
|
||||
'updatetime' => time(),
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$update && $realname === '') {
|
||||
$this->fail('没有需要更新的资料');
|
||||
}
|
||||
$update['updatetime'] = time();
|
||||
Db::name('user')->where('id', $user['id'])->update($update);
|
||||
$user = Db::name('user')->where('id', $user['id'])->find();
|
||||
}
|
||||
|
||||
$this->ok($this->userInfo($user));
|
||||
|
||||
@@ -352,6 +352,11 @@ class Distribution extends V1
|
||||
$rows = Db::name('fc_withdraw')->where('user_id', $user['id'])
|
||||
->order('createtime desc')->select();
|
||||
|
||||
$epay = (array)get_addon_config('epay');
|
||||
$wx = isset($epay['wechat']) && is_array($epay['wechat']) ? $epay['wechat'] : [];
|
||||
$mchId = isset($wx['mch_id']) ? (string)$wx['mch_id'] : '1118898018';
|
||||
$appId = isset($wx['miniapp_id']) ? (string)$wx['miniapp_id'] : 'wxbfcb778f3019cff8';
|
||||
|
||||
$list = [];
|
||||
foreach ($rows as $row) {
|
||||
$list[] = [
|
||||
@@ -363,6 +368,8 @@ class Distribution extends V1
|
||||
'packageInfo' => (string)(isset($row['package_info']) ? $row['package_info'] : ''),
|
||||
'failReason' => (string)(isset($row['fail_reason']) ? $row['fail_reason'] : ''),
|
||||
'createdAt' => $this->iso($row['createtime']),
|
||||
'transferMchId' => $mchId,
|
||||
'transferAppId' => $appId,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,7 @@ class WxTransfer
|
||||
*
|
||||
* 流程:auditing → paying(落 out_bill_no)→ 调微信创建转账单 → 立即结果 / 等待回调
|
||||
* 失败时回滚为 auditing,允许重新审核。
|
||||
* 若处于 paying 状态重试,先向微信查询单号状态,避免重复创建转账单。
|
||||
*
|
||||
* @param int $withdrawId
|
||||
* @return array{state:string,withdrawState:string}
|
||||
@@ -172,17 +173,31 @@ class WxTransfer
|
||||
if (!$withdraw) {
|
||||
throw new \RuntimeException('提现记录不存在');
|
||||
}
|
||||
if ((string)$withdraw['status'] !== 'auditing') {
|
||||
if (!in_array((string)$withdraw['status'], ['auditing', 'paying'], true)) {
|
||||
throw new \RuntimeException('该提现记录已处理(当前状态:' . $withdraw['status'] . ')');
|
||||
}
|
||||
|
||||
$outBillNo = self::makeOutBillNo($withdraw);
|
||||
// 若当前单据卡在 paying 状态,先主动向微信查询是否已创建转账单
|
||||
if ((string)$withdraw['status'] === 'paying' && !empty($withdraw['out_bill_no'])) {
|
||||
try {
|
||||
$queryRes = self::query($withdraw['out_bill_no']);
|
||||
if (!empty($queryRes['state'])) {
|
||||
$state = self::applyResult($queryRes);
|
||||
$withdrawState = (string)Db::name('fc_withdraw')->where('id', (int)$withdraw['id'])->value('status');
|
||||
return ['state' => $state, 'withdrawState' => $withdrawState];
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
Log::record('提现记录 #' . $withdrawId . ' 处于 paying,微信查询补偿跳过:' . $e->getMessage(), 'notice');
|
||||
}
|
||||
}
|
||||
|
||||
$outBillNo = !empty($withdraw['out_bill_no']) ? $withdraw['out_bill_no'] : self::makeOutBillNo($withdraw);
|
||||
$now = time();
|
||||
|
||||
// 1) 先落「转账中」,防止重复点击造成重复转账
|
||||
Db::transaction(function () use ($withdraw, $outBillNo, $now) {
|
||||
$locked = Db::name('fc_withdraw')->where('id', (int)$withdraw['id'])->lock(true)->find();
|
||||
if (!$locked || (string)$locked['status'] !== 'auditing') {
|
||||
if (!$locked || !in_array((string)$locked['status'], ['auditing', 'paying'], true)) {
|
||||
throw new \RuntimeException('该提现记录已处理,请刷新后重试');
|
||||
}
|
||||
Db::name('fc_withdraw')->where('id', (int)$locked['id'])->update([
|
||||
@@ -208,10 +223,11 @@ class WxTransfer
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$transferStatus = substr((string)$res['state'], 0, 32);
|
||||
Db::name('fc_withdraw')->where('id', (int)$withdraw['id'])->update([
|
||||
'transfer_id' => $res['transfer_bill_no'],
|
||||
'package_info' => $res['package_info'],
|
||||
'transfer_status' => $res['state'],
|
||||
'transfer_id' => isset($res['transfer_bill_no']) ? (string)$res['transfer_bill_no'] : '',
|
||||
'package_info' => isset($res['package_info']) ? (string)$res['package_info'] : '',
|
||||
'transfer_status' => $transferStatus,
|
||||
'transfer_time' => time(),
|
||||
]);
|
||||
|
||||
@@ -219,7 +235,8 @@ class WxTransfer
|
||||
$state = self::applyResult([
|
||||
'out_bill_no' => $outBillNo,
|
||||
'state' => $res['state'],
|
||||
'transfer_bill_no' => $res['transfer_bill_no'],
|
||||
'transfer_bill_no' => isset($res['transfer_bill_no']) ? (string)$res['transfer_bill_no'] : '',
|
||||
'package_info' => isset($res['package_info']) ? (string)$res['package_info'] : '',
|
||||
'fail_reason' => isset($res['fail_reason']) ? $res['fail_reason'] : '',
|
||||
]);
|
||||
|
||||
@@ -327,6 +344,7 @@ class WxTransfer
|
||||
|
||||
$state = strtoupper(trim((string)(isset($data['state']) ? $data['state'] : '')));
|
||||
$transferBillNo = isset($data['transfer_bill_no']) ? (string)$data['transfer_bill_no'] : '';
|
||||
$packageInfo = isset($data['package_info']) ? (string)$data['package_info'] : '';
|
||||
$failReason = isset($data['fail_reason']) ? (string)$data['fail_reason'] : '';
|
||||
|
||||
$withdraw = Db::name('fc_withdraw')->where('out_bill_no', $outBillNo)->find();
|
||||
@@ -448,12 +466,18 @@ class WxTransfer
|
||||
}
|
||||
|
||||
// WAIT_USER_CONFIRM / ACCEPTED / PROCESSING:保持 paying,等待用户确认或回调
|
||||
Db::name('fc_withdraw')->where('id', (int)$withdraw['id'])->update([
|
||||
'transfer_status' => $state,
|
||||
'transfer_id' => $transferBillNo,
|
||||
$updateData = [
|
||||
'transfer_status' => substr($state, 0, 32),
|
||||
'transfer_time' => $now,
|
||||
'updatetime' => $now,
|
||||
]);
|
||||
];
|
||||
if ($transferBillNo !== '') {
|
||||
$updateData['transfer_id'] = $transferBillNo;
|
||||
}
|
||||
if ($packageInfo !== '') {
|
||||
$updateData['package_info'] = $packageInfo;
|
||||
}
|
||||
Db::name('fc_withdraw')->where('id', (int)$withdraw['id'])->update($updateData);
|
||||
|
||||
return 'paying';
|
||||
}
|
||||
|
||||
@@ -27,14 +27,30 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'backend/format'], fu
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('SerialNo'), operate: false, sortable: false, align: 'center', width: '70px', class: 'fc-serial', table: table, formatter: Format.serial},
|
||||
{field: 'nickname', title: '用户', operate: 'LIKE'},
|
||||
{field: 'id', title: __('SerialNo'), operate: false, sortable: false, align: 'center', width: '60px', class: 'fc-serial', table: table, formatter: Format.serial},
|
||||
{field: 'nickname', title: '用户昵称', operate: 'LIKE'},
|
||||
{field: 'mobile', title: '手机号', operate: 'LIKE'},
|
||||
{
|
||||
field: 'realname', title: '真实姓名(实名)', operate: 'LIKE',
|
||||
formatter: function (value, row) {
|
||||
if (!value) {
|
||||
return '<span class="text-muted"><i class="fa fa-minus-circle"></i> 未填写</span>';
|
||||
}
|
||||
var isAuthed = parseInt(row.realname_status) === 1;
|
||||
var icon = isAuthed ? '<i class="fa fa-shield text-success" title="微信已核验实名"></i> ' : '<i class="fa fa-question-circle text-muted" title="未核验"></i> ';
|
||||
return icon + '<span class="text-bold" style="color: #2c3e50;">' + value + '</span>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'realname_status', title: '实名状态',
|
||||
searchList: {'0': '未认证', '1': '已认证'},
|
||||
formatter: Format.statusFormatter({'0': '未认证', '1': '已实名'}, {'0': 'default', '1': 'success'})
|
||||
},
|
||||
{
|
||||
field: 'money', title: __('Money'), operate: false,
|
||||
formatter: function (value) {
|
||||
var n = parseFloat(value || 0);
|
||||
return n > 0 ? '¥' + n.toFixed(2) : '¥0.00';
|
||||
return '<span class="text-bold" style="color: #00A854;">¥' + n.toFixed(2) + '</span>';
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -51,28 +67,31 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'backend/format'], fu
|
||||
{field: 'member_expiretime', title: __('Member_expiretime'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'invite_code', title: __('Invite_code'), operate: 'LIKE'},
|
||||
{field: 'openid', title: __('Openid'), operate: 'LIKE', visible: false},
|
||||
{
|
||||
field: 'realname_status', title: __('Realname_status'), visible: false,
|
||||
searchList: {'0': __('未认证'), '1': __('已认证')},
|
||||
formatter: function (value) {
|
||||
var m = {'0': __('未认证'), '1': __('已认证')};
|
||||
return m[value] !== undefined ? m[value] : '-';
|
||||
}
|
||||
},
|
||||
{field: 'inviter_id', title: __('Inviter_id'), visible: false},
|
||||
{field: 'free_view_date', title: __('Free_view_date'), visible: false},
|
||||
{field: 'free_view_used', title: __('Free_view_used'), visible: false},
|
||||
{field: 'post_quota_left', title: '剩余发布额度', operate: false, visible: false},
|
||||
{field: 'createtime', title: __('Createtime'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'updatetime', title: __('Updatetime'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime, visible: false},
|
||||
{
|
||||
field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
buttons: [
|
||||
{
|
||||
name: 'detail',
|
||||
text: '详情',
|
||||
title: function (row) {
|
||||
return '用户详情 - ' + (row.nickname || ('UID:' + row.user_id));
|
||||
},
|
||||
classname: 'btn btn-xs btn-info btn-dialog',
|
||||
icon: 'fa fa-user-circle-o',
|
||||
url: 'fc/userext/detail',
|
||||
extend: 'data-area=\'["960px", "780px"]\''
|
||||
},
|
||||
{
|
||||
name: 'recharge',
|
||||
text: '充值',
|
||||
title: '余额充值',
|
||||
classname: 'btn btn-xs btn-warning btn-click',
|
||||
icon: 'fa fa-money',
|
||||
click: function (options, row) {
|
||||
var nickname = row.nickname || ('用户#' + row.user_id);
|
||||
var balance = parseFloat(row.money || 0).toFixed(2);
|
||||
@@ -121,6 +140,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'backend/format'], fu
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
detail: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
|
||||
90
tools/deploy_latest_changes.py
普通文件
90
tools/deploy_latest_changes.py
普通文件
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
部署最新修改至线上服务器
|
||||
变动文件:
|
||||
- application/admin/controller/fc/Userext.php
|
||||
- application/admin/view/fc/userext/edit.html
|
||||
- application/admin/view/fc/userext/detail.html
|
||||
- application/api/controller/Auth.php
|
||||
- public/assets/js/backend/fc/userext.js
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import io
|
||||
import paramiko
|
||||
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
|
||||
|
||||
HOST = "8.137.181.63"
|
||||
PORT = 22
|
||||
USER = "root"
|
||||
PASSWORD = "liyanxia@6688"
|
||||
REMOTE_ROOT = "/www/wwwroot/fenleixinxi.gzyakj.com.cn"
|
||||
LOCAL_ROOT = r"D:\Softwares\phpstudy_pro\WWW\fenleixinxi"
|
||||
|
||||
SYNC_FILES = [
|
||||
"application/admin/controller/fc/Userext.php",
|
||||
"application/admin/view/fc/userext/edit.html",
|
||||
"application/admin/view/fc/userext/detail.html",
|
||||
"application/api/controller/Auth.php",
|
||||
"public/assets/js/backend/fc/userext.js",
|
||||
]
|
||||
|
||||
def ssh_exec(client, cmd):
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
out = stdout.read().decode("utf-8", errors="replace").strip()
|
||||
err = stderr.read().decode("utf-8", errors="replace").strip()
|
||||
return out, err
|
||||
|
||||
def main():
|
||||
print("=== [1/3] 连接线上服务器 ===")
|
||||
client = paramiko.SSHClient()
|
||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
client.connect(HOST, port=PORT, username=USER, password=PASSWORD, timeout=30)
|
||||
print(f"✓ 成功连接 {HOST}")
|
||||
|
||||
sftp = client.open_sftp()
|
||||
print("✓ SFTP 通道已建立")
|
||||
|
||||
print("\n=== [2/3] 同步最新修改文件 ===")
|
||||
for rel_path in SYNC_FILES:
|
||||
local_path = os.path.join(LOCAL_ROOT, rel_path.replace("/", "\\"))
|
||||
remote_path = f"{REMOTE_ROOT}/{rel_path}"
|
||||
|
||||
if not os.path.exists(local_path):
|
||||
print(f" ✗ 本地文件缺失: {local_path}")
|
||||
continue
|
||||
|
||||
# 确保远程目录存在
|
||||
remote_dir = os.path.dirname(remote_path)
|
||||
ssh_exec(client, f"mkdir -p '{remote_dir}'")
|
||||
|
||||
sftp.put(local_path, remote_path)
|
||||
ssh_exec(client, f"chown www:www '{remote_path}'")
|
||||
file_size = os.path.getsize(local_path)
|
||||
print(f" ✓ 已同步: {rel_path} ({file_size} 字节)")
|
||||
|
||||
sftp.close()
|
||||
|
||||
print("\n=== [3/3] 清理缓存与服务自检 ===")
|
||||
ssh_exec(client, f"rm -rf {REMOTE_ROOT}/runtime/temp/* {REMOTE_ROOT}/runtime/cache/*")
|
||||
print("✓ 线上 ThinkPHP 缓存清理完成")
|
||||
|
||||
# 接口健康自检
|
||||
check_urls = [
|
||||
("API 信息流接口", "https://fenleixinxi.gzyakj.com.cn/api/v1/home/feed"),
|
||||
("API 分类接口", "https://fenleixinxi.gzyakj.com.cn/api/v1/home/categories"),
|
||||
("后台登录页面", "https://fenleixinxi.gzyakj.com.cn/s.php/index/login"),
|
||||
]
|
||||
for name, url in check_urls:
|
||||
cmd = f"curl -s -o /dev/null -w '%{{http_code}}' -k '{url}'"
|
||||
code, _ = ssh_exec(client, cmd)
|
||||
print(f" {name}: HTTP {code}")
|
||||
|
||||
client.close()
|
||||
print("\n✓ 最新修改已顺利部署至线上服务器!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
97
tools/deploy_transfer_fixes.py
普通文件
97
tools/deploy_transfer_fixes.py
普通文件
@@ -0,0 +1,97 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
部署最新全部修改至线上服务器
|
||||
文件清单:
|
||||
- addons/epay/library/v3new/Yansongda/Pay/Shortcut/Wechat/MchTransferShortcut.php
|
||||
- application/admin/controller/fc/Userext.php
|
||||
- application/admin/controller/fc/Withdraw.php
|
||||
- application/admin/view/fc/userext/edit.html
|
||||
- application/admin/view/fc/userext/detail.html
|
||||
- application/api/controller/Auth.php
|
||||
- application/api/controller/Distribution.php
|
||||
- application/common/library/WxTransfer.php
|
||||
- public/assets/js/backend/fc/userext.js
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import io
|
||||
import paramiko
|
||||
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
|
||||
|
||||
HOST = "8.137.181.63"
|
||||
PORT = 22
|
||||
USER = "root"
|
||||
PASSWORD = "liyanxia@6688"
|
||||
REMOTE_ROOT = "/www/wwwroot/fenleixinxi.gzyakj.com.cn"
|
||||
LOCAL_ROOT = r"D:\Softwares\phpstudy_pro\WWW\fenleixinxi"
|
||||
|
||||
SYNC_FILES = [
|
||||
"addons/epay/library/v3new/Yansongda/Pay/Shortcut/Wechat/MchTransferShortcut.php",
|
||||
"application/admin/controller/fc/Userext.php",
|
||||
"application/admin/controller/fc/Withdraw.php",
|
||||
"application/admin/view/fc/userext/edit.html",
|
||||
"application/admin/view/fc/userext/detail.html",
|
||||
"application/api/controller/Auth.php",
|
||||
"application/api/controller/Distribution.php",
|
||||
"application/common/library/WxTransfer.php",
|
||||
"public/assets/js/backend/fc/userext.js",
|
||||
]
|
||||
|
||||
def ssh_exec(client, cmd):
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
out = stdout.read().decode("utf-8", errors="replace").strip()
|
||||
err = stderr.read().decode("utf-8", errors="replace").strip()
|
||||
return out, err
|
||||
|
||||
def main():
|
||||
print("=== [1/3] 连接线上服务器 ===")
|
||||
client = paramiko.SSHClient()
|
||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
client.connect(HOST, port=PORT, username=USER, password=PASSWORD, timeout=30)
|
||||
print(f"✓ 成功连接 {HOST}")
|
||||
|
||||
sftp = client.open_sftp()
|
||||
print("✓ SFTP 通道已建立")
|
||||
|
||||
print("\n=== [2/3] 同步最新修改的代码文件 ===")
|
||||
for rel_path in SYNC_FILES:
|
||||
local_path = os.path.join(LOCAL_ROOT, rel_path.replace("/", "\\"))
|
||||
remote_path = f"{REMOTE_ROOT}/{rel_path}"
|
||||
|
||||
if not os.path.exists(local_path):
|
||||
print(f" ✗ 本地文件缺失: {local_path}")
|
||||
continue
|
||||
|
||||
remote_dir = os.path.dirname(remote_path)
|
||||
ssh_exec(client, f"mkdir -p '{remote_dir}'")
|
||||
|
||||
sftp.put(local_path, remote_path)
|
||||
ssh_exec(client, f"chown www:www '{remote_path}'")
|
||||
file_size = os.path.getsize(local_path)
|
||||
print(f" ✓ 已同步: {rel_path} ({file_size} 字节)")
|
||||
|
||||
sftp.close()
|
||||
|
||||
print("\n=== [3/3] 清理缓存与服务自检 ===")
|
||||
ssh_exec(client, f"rm -rf {REMOTE_ROOT}/runtime/temp/* {REMOTE_ROOT}/runtime/cache/*")
|
||||
print("✓ 线上 ThinkPHP 缓存清理完成")
|
||||
|
||||
# 接口健康自检
|
||||
check_urls = [
|
||||
("API 信息流接口", "https://fenleixinxi.gzyakj.com.cn/api/v1/home/feed"),
|
||||
("API 分类接口", "https://fenleixinxi.gzyakj.com.cn/api/v1/home/categories"),
|
||||
("后台登录页面", "https://fenleixinxi.gzyakj.com.cn/s.php/index/login"),
|
||||
]
|
||||
for name, url in check_urls:
|
||||
cmd = f"curl -s -o /dev/null -w '%{{http_code}}' -k '{url}'"
|
||||
code, _ = ssh_exec(client, cmd)
|
||||
print(f" {name}: HTTP {code}")
|
||||
|
||||
client.close()
|
||||
print("\n✓ 最新代码已全部部署至线上服务器!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
75
tools/exec_alter_table.py
普通文件
75
tools/exec_alter_table.py
普通文件
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""在远程和本地数据库执行 ALTER TABLE 语句"""
|
||||
|
||||
import paramiko
|
||||
import pymysql
|
||||
import sys
|
||||
import io
|
||||
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
|
||||
|
||||
HOST = "8.137.181.63"
|
||||
PORT = 22
|
||||
USER = "root"
|
||||
PASSWORD = "liyanxia@6688"
|
||||
DB_USER = "fenleixinxi"
|
||||
DB_PASS = "fenleixinxi"
|
||||
DB_NAME = "fenleixinxi"
|
||||
|
||||
LOCAL_DB_HOST = "127.0.0.1"
|
||||
LOCAL_DB_PORT = 3307
|
||||
|
||||
SQL = "ALTER TABLE `fa_fc_withdraw` MODIFY COLUMN `transfer_status` varchar(32) NOT NULL DEFAULT '' COMMENT 'WAIT_USER_CONFIRM/ACCEPTED/PROCESSING/SUCCESS/FAIL/CANCELLED';"
|
||||
|
||||
def main():
|
||||
print("=== [1/2] 线上数据库执行 ALTER TABLE ===")
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect(HOST, port=PORT, username=USER, password=PASSWORD, timeout=20)
|
||||
|
||||
# 1. 查看线上执行前字段定义
|
||||
cmd_chk_before = f'mysql -u{DB_USER} -p{DB_PASS} {DB_NAME} -e "SHOW FULL COLUMNS FROM fa_fc_withdraw LIKE \'transfer_status\';" 2>/dev/null'
|
||||
_, stdout, _ = ssh.exec_command(cmd_chk_before)
|
||||
print("线上执行前状态:\n" + stdout.read().decode('utf-8', errors='replace').strip())
|
||||
|
||||
# 2. 执行 ALTER TABLE
|
||||
cmd_exec = f'mysql -u{DB_USER} -p{DB_PASS} {DB_NAME} -e "{SQL}" 2>/dev/null'
|
||||
_, stdout, stderr = ssh.exec_command(cmd_exec)
|
||||
err = stderr.read().decode('utf-8', errors='replace').strip()
|
||||
if err and "error" in err.lower():
|
||||
print(f"✗ 线上执行报错: {err}")
|
||||
else:
|
||||
print("✓ 线上执行成功!")
|
||||
|
||||
# 3. 查看线上执行后字段定义
|
||||
cmd_chk_after = f'mysql -u{DB_USER} -p{DB_PASS} {DB_NAME} -e "SHOW FULL COLUMNS FROM fa_fc_withdraw LIKE \'transfer_status\';" 2>/dev/null'
|
||||
_, stdout, _ = ssh.exec_command(cmd_chk_after)
|
||||
print("\n线上执行后状态:\n" + stdout.read().decode('utf-8', errors='replace').strip())
|
||||
|
||||
ssh.close()
|
||||
|
||||
print("\n=== [2/2] 本地开发数据库执行 ALTER TABLE (同步保持一致) ===")
|
||||
try:
|
||||
conn = pymysql.connect(
|
||||
host=LOCAL_DB_HOST,
|
||||
port=LOCAL_DB_PORT,
|
||||
user=DB_USER,
|
||||
password=DB_PASS,
|
||||
database=DB_NAME,
|
||||
charset="utf8mb4",
|
||||
autocommit=True
|
||||
)
|
||||
with conn.cursor() as cur:
|
||||
cur.execute(SQL)
|
||||
cur.execute("SHOW FULL COLUMNS FROM fa_fc_withdraw LIKE 'transfer_status';")
|
||||
row = cur.fetchone()
|
||||
print(f"✓ 本地数据库执行成功: 字段={row[0]}, 类型={row[1]}, 注释={row[8]}")
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
print(f"- 本地执行提示: {e}")
|
||||
|
||||
print("\n✓ 全部执行与验证完成!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -374,16 +374,29 @@
|
||||
<text class="dist__sheet-balance-num">{{ money(overview.withdrawable) }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 收款人真实姓名校验 -->
|
||||
<view v-if="!realname" class="dist__sheet-field">
|
||||
<input
|
||||
v-model="realnameInput"
|
||||
class="dist__sheet-input dist__sheet-input--name"
|
||||
type="text"
|
||||
maxlength="20"
|
||||
placeholder="收款人真实姓名(需与微信实名一致)"
|
||||
placeholder-class="dist__sheet-placeholder"
|
||||
/>
|
||||
<!-- 收款人真实姓名(提现实名核验,始终展示支持核对与修改) -->
|
||||
<view class="dist__sheet-recipient">
|
||||
<view class="dist__sheet-recipient-head">
|
||||
<text class="dist__sheet-recipient-title">收款人真实姓名</text>
|
||||
<view v-if="realname" class="dist__sheet-recipient-tag">
|
||||
<image class="dist__sheet-recipient-tag-icon" :src="iconUrl('check')" mode="aspectFit" />
|
||||
<text>已实名认证</text>
|
||||
</view>
|
||||
<text v-else class="dist__sheet-recipient-tag dist__sheet-recipient-tag--unauth">未实名</text>
|
||||
</view>
|
||||
<view class="dist__sheet-field dist__sheet-field--name">
|
||||
<input
|
||||
v-model="realnameInput"
|
||||
class="dist__sheet-input dist__sheet-input--name"
|
||||
type="text"
|
||||
maxlength="20"
|
||||
placeholder="请输入收款人真实姓名(需与微信实名一致)"
|
||||
placeholder-class="dist__sheet-placeholder"
|
||||
/>
|
||||
</view>
|
||||
<view class="dist__sheet-recipient-hint">
|
||||
<text>资金直转此姓名对应的微信零钱,请务必核对一致</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提现金额输入 -->
|
||||
@@ -1548,6 +1561,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.withdrawAmount = ''
|
||||
this.realnameInput = this.realname || ''
|
||||
this.showWithdraw = true
|
||||
},
|
||||
|
||||
@@ -1557,22 +1571,41 @@ export default {
|
||||
*/
|
||||
confirmTransfer(w) {
|
||||
if (!w || !w.packageInfo) {
|
||||
uni.showToast({ title: '转账处理中,请在微信消息中确认收款', icon: 'none' })
|
||||
uni.showToast({ title: '转账处理中,请稍后刷新重试', icon: 'none' })
|
||||
return
|
||||
}
|
||||
if (typeof uni === 'undefined' || !uni.requestMerchantTransfer) {
|
||||
uni.showToast({ title: '请在微信消息中确认收款', icon: 'none' })
|
||||
// 优先使用微信原生 API(wx.requestMerchantTransfer 为微信基础库 3.3.0+ 商家转账确认专属 API)
|
||||
const api = (typeof wx !== 'undefined' && typeof wx.requestMerchantTransfer === 'function')
|
||||
? wx.requestMerchantTransfer
|
||||
: (typeof uni !== 'undefined' && typeof uni.requestMerchantTransfer === 'function' ? uni.requestMerchantTransfer : null)
|
||||
|
||||
if (!api) {
|
||||
uni.showToast({ title: '当前微信版本过低,请升级微信后重试', icon: 'none' })
|
||||
return
|
||||
}
|
||||
uni.requestMerchantTransfer({
|
||||
mchId: (this.overview && this.overview.transferMchId) || '',
|
||||
appId: (this.overview && this.overview.transferAppId) || '',
|
||||
package: w.packageInfo,
|
||||
success: () => {
|
||||
uni.showToast({ title: '已确认,等待到账', icon: 'none' })
|
||||
|
||||
const mchId = String((w && w.transferMchId) || (this.overview && this.overview.transferMchId) || '1118898018')
|
||||
const appId = String((w && w.transferAppId) || (this.overview && this.overview.transferAppId) || 'wxbfcb778f3019cff8')
|
||||
const pkg = String(w.packageInfo)
|
||||
|
||||
api({
|
||||
mchId: mchId,
|
||||
appId: appId,
|
||||
package: pkg,
|
||||
success: (res) => {
|
||||
console.log('[Transfer] 确认收款成功:', res)
|
||||
uni.showToast({ title: '已确认,等待到账', icon: 'success' })
|
||||
setTimeout(() => this.refreshAfterWithdraw(), 1500)
|
||||
},
|
||||
fail: () => uni.showToast({ title: '已取消确认', icon: 'none' }),
|
||||
fail: (err) => {
|
||||
console.warn('[Transfer] 确认收款回调异常:', err)
|
||||
const msg = (err && (err.errMsg || err.message)) || ''
|
||||
if (msg.indexOf('cancel') !== -1) {
|
||||
uni.showToast({ title: '您取消了确认收款', icon: 'none' })
|
||||
} else {
|
||||
uni.showToast({ title: msg || '调起确认失败,请重试', icon: 'none', duration: 3000 })
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1614,17 +1647,19 @@ export default {
|
||||
|
||||
this.submitting = true
|
||||
try {
|
||||
if (!this.realname) {
|
||||
const name = String(this.realnameInput || '').trim()
|
||||
if (!/^[\u4e00-\u9fa5·]{2,20}$/.test(name)) {
|
||||
uni.showToast({ title: '请填写 2-20 位中文真实姓名', icon: 'none' })
|
||||
return
|
||||
}
|
||||
const name = String(this.realnameInput || this.realname || '').trim()
|
||||
if (!name || !/^[\u4e00-\u9fa5·]{2,20}$/.test(name)) {
|
||||
uni.showToast({ title: '请填写 2-20 位中文真实姓名', icon: 'none' })
|
||||
this.submitting = false
|
||||
return
|
||||
}
|
||||
if (name !== this.realname) {
|
||||
try {
|
||||
await authApi.saveRealname({ realname: name })
|
||||
this.realname = name
|
||||
} catch (e) {
|
||||
uni.showToast({ title: e.message || '姓名保存失败', icon: 'none' })
|
||||
uni.showToast({ title: (e && e.message) || '姓名保存失败', icon: 'none' })
|
||||
this.submitting = false
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -2400,6 +2435,48 @@ export default {
|
||||
font-weight: 700;
|
||||
color: #04301E;
|
||||
}
|
||||
.dist__sheet-recipient {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.dist__sheet-recipient-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.dist__sheet-recipient-title {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #1E293B;
|
||||
}
|
||||
.dist__sheet-recipient-tag {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #E8FAF0;
|
||||
color: #00A854;
|
||||
font-size: 20rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.dist__sheet-recipient-tag--unauth {
|
||||
background: #F1F5F9;
|
||||
color: #94A3B8;
|
||||
}
|
||||
.dist__sheet-recipient-tag-icon {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.dist__sheet-recipient-hint {
|
||||
margin-top: 8rpx;
|
||||
font-size: 22rpx;
|
||||
color: #F5A623;
|
||||
}
|
||||
.dist__sheet-field--name {
|
||||
margin-top: 0;
|
||||
padding: 16rpx 20rpx;
|
||||
}
|
||||
.dist__sheet-field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -48,6 +48,30 @@
|
||||
<text class="profile__field-tip">可直接点击输入框自动填入微信昵称</text>
|
||||
</view>
|
||||
|
||||
<!-- 收款人真实姓名(提现实名认证) -->
|
||||
<view class="profile__field">
|
||||
<view class="profile__label-row">
|
||||
<text class="profile__label">收款人真实姓名</text>
|
||||
<view v-if="userInfo && userInfo.realnameStatus" class="profile__tag profile__tag--verified">
|
||||
<text class="profile__tag-text">已实名认证</text>
|
||||
</view>
|
||||
<view v-else class="profile__tag profile__tag--pending">
|
||||
<text class="profile__tag-text">未实名</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profile__input-wrap">
|
||||
<input
|
||||
class="profile__input"
|
||||
type="text"
|
||||
v-model="form.realname"
|
||||
placeholder="请输入您的真实姓名(如:张三)"
|
||||
placeholder-class="profile__placeholder"
|
||||
maxlength="20"
|
||||
/>
|
||||
</view>
|
||||
<text class="profile__field-tip">用于微信零钱提现核验,须与微信支付实名姓名完全一致</text>
|
||||
</view>
|
||||
|
||||
<!-- 绑定手机号(只读展示) -->
|
||||
<view class="profile__field">
|
||||
<text class="profile__label">绑定手机号</text>
|
||||
@@ -105,6 +129,7 @@ export default {
|
||||
previewAvatar: '',
|
||||
form: {
|
||||
nickname: '',
|
||||
realname: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -175,6 +200,7 @@ export default {
|
||||
initData() {
|
||||
if (this.userInfo) {
|
||||
this.form.nickname = this.userInfo.nickname || ''
|
||||
this.form.realname = this.userInfo.realname || ''
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -217,6 +243,11 @@ export default {
|
||||
uni.showToast({ title: '请输入用户昵称', icon: 'none' })
|
||||
return
|
||||
}
|
||||
const realname = (this.form.realname || '').trim()
|
||||
if (realname && !/^[\u4e00-\u9fa5·]{2,20}$/.test(realname)) {
|
||||
uni.showToast({ title: '真实姓名需为2-20位中文', icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
this.saving = true
|
||||
try {
|
||||
@@ -231,6 +262,7 @@ export default {
|
||||
|
||||
const payload = {
|
||||
nickname,
|
||||
realname,
|
||||
}
|
||||
if (avatarUrl) {
|
||||
payload.avatar = avatarUrl
|
||||
@@ -357,6 +389,41 @@ export default {
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.profile__label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12rpx;
|
||||
|
||||
.profile__label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.profile__tag {
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 8rpx;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
&--verified {
|
||||
background: #e8fbf1;
|
||||
.profile__tag-text {
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
color: #00a854;
|
||||
}
|
||||
}
|
||||
|
||||
&--pending {
|
||||
background: #f1f5f9;
|
||||
.profile__tag-text {
|
||||
font-size: 22rpx;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.profile__input-wrap {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
|
||||
在新工单中引用
屏蔽一个用户