From fb9963d49fd73817a467c48b7ab62dd85c5aaef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Wed, 7 Jan 2026 14:13:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E5=B8=815=E5=88=86=E9=92=9F=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/UserWallet.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/api/model/UserWallet.php b/application/api/model/UserWallet.php index c0bd52e3..44f68dd5 100644 --- a/application/api/model/UserWallet.php +++ b/application/api/model/UserWallet.php @@ -123,7 +123,9 @@ class UserWallet extends Model //从缓存中获取 $exchange_user = Cache::get('exchange_user_' . $uid); if($exchange_user){ - return ['code' => 0, 'msg' => '请5分钟后再次兑换', 'data' => null]; + //获取缓存的过期剩余 时间 + $time = Cache::store('redis')->handler()->ttl('exchange_user_' . $uid); + return ['code' => 0, 'msg' => '请'.$time.'秒后再次兑换', 'data' => null]; }else{ Cache::set('exchange_user_' . $uid, 1, 5 * 60); }