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); }