wesmiler 6 tahun lalu
induk
melakukan
f14021a946
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 2
      app/index/service/Goods.php

+ 1 - 2
app/index/service/Goods.php

@@ -45,7 +45,6 @@ class Goods
             ->order($order)
             ->paginate($pageSize)
             ->each(function ($item, $k) use($currencys) {
-                $curTime = strtotime(date('Y-m-d'));
                 $startTime = isset($item['start_date'])? strtotime($item['start_date']) : '';
                 $publishTime = isset($item['publish_date'])? strtotime($item['publish_date']) : '';
                 if(time()>= $startTime && time() <= $startTime+7200){
@@ -56,7 +55,7 @@ class Goods
                     $item['status'] = 3;
                 }
 
-
+                $item['publish_type'] = isset($item['publish_type'])? strtolower($item['publish_type']) : '';
                 $item['thumb'] = isset($item['thumb']) ? cmf_get_image_preview_url($item['thumb']) : '';
                 $item['publish_date'] = $publishTime ? date('Y.m.d H:i', $publishTime) : '未公布';
                 $item['start_date'] = $startTime ? date('Y.m.d H:i', $startTime) : '未公布';