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;