作者 何书鹏
1 个管道 的构建 通过 耗费 3 秒

bug修改

... ... @@ -39,7 +39,8 @@ class Order extends Model
// 抢单倒计时
public function getGrabCountdownAttr($value,$data){
$grab_countdown = config('countdown.grab') - (time() - $data['pay_time']);
$pay_time = is_string($data['pay_time']) ? strtotime($data['pay_time']) : $data['pay_time'];
$grab_countdown = config('countdown.grab') - (time() - $pay_time);
$grab_countdown = $grab_countdown > 0 ? $grab_countdown : 0;
return [
'minute' => floor($grab_countdown / 60),
... ...