From 8c2cfb5ae6d98c63e762bb294c017c5d2b7a2d5b Mon Sep 17 00:00:00 2001 From: lqmac Date: Tue, 12 Mar 2024 09:09:53 +0800 Subject: [PATCH] 1 --- app/api/model/Goods.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/api/model/Goods.php b/app/api/model/Goods.php index b469f239..f649dbf3 100644 --- a/app/api/model/Goods.php +++ b/app/api/model/Goods.php @@ -260,7 +260,8 @@ class Goods extends GoodsModel 'file_id' => $file_id, ])->field('file_path')->find()->file_path; $v['image'] = "https://".$_SERVER['HTTP_HOST'] . '/uploads/' . $file_path; - $v['end_time'] = strtotime($info->p_time) - time(); + //$v['end_time'] = strtotime($info->p_time) - time(); + $v['end_time'] = $info->p_time ? strtotime($info->p_time) - time() : 0; } return $list;