This commit is contained in:
Billy 2025-11-20 18:51:28 +08:00
parent 18e52067ee
commit 313061e30b

View File

@ -235,11 +235,14 @@ class Withdraw
}
// 检查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 (isset($this->config['days_7']) && intval($this->config['days_7']) == 1) {
$createtime = intval($withdraw->createtime);
if ($createtime > 0) {
$daysDiff = (time() - $createtime) / 86400; // 86400秒 = 1天
if ($daysDiff < 7) {
$remainingDays = ceil(7 - $daysDiff);
throw new ShoproException('提现申请时间未超过7天还需等待' . $remainingDays . '天才能放款');
}
}
}