From 18e52067ee597eac20c627edbc812a4022c9e294 Mon Sep 17 00:00:00 2001 From: Billy <641833868@qq.com> Date: Thu, 20 Nov 2025 18:47:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/shopro/service/Withdraw.php | 10 ++++++++++ application/admin/view/shopro/config/index.html | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/addons/shopro/service/Withdraw.php b/addons/shopro/service/Withdraw.php index 42ccd42..799de0d 100755 --- a/addons/shopro/service/Withdraw.php +++ b/addons/shopro/service/Withdraw.php @@ -233,6 +233,16 @@ class Withdraw if ($withdraw->status != 1) { throw new ShoproException('请勿重复操作'); } + + // 检查7天限制 + if (isset($this->config['days_7']) && $this->config['days_7'] == 1) { + $daysDiff = (time() - $withdraw->createtime) / 86400; // 86400秒 = 1天 + if ($daysDiff < 7) { + $remainingDays = ceil(7 - $daysDiff); + throw new ShoproException('提现申请时间未超过7天,还需等待' . $remainingDays . '天才能放款'); + } + } + if ($withdraw->withdraw_type !== 'bank') { $withDrawStatus = $this->handleTransfer($withdraw); } else { diff --git a/application/admin/view/shopro/config/index.html b/application/admin/view/shopro/config/index.html index b3d390b..184f698 100644 --- a/application/admin/view/shopro/config/index.html +++ b/application/admin/view/shopro/config/index.html @@ -631,6 +631,21 @@ + +
+
+ +
+ {{form.model.withdraw.days_7 == 1?'开启':'关闭'}} +
+
+
+ 开启后,如果提现申请时间没有超过7天是不能放款的 +
+
+