|
|
@@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
namespace addons\unishop\controller; |
|
|
|
|
|
|
|
use addons\unishop\model\Config; |
|
|
|
use app\common\controller\Api; |
|
|
|
|
|
|
|
class Category extends Api |
|
|
@@ -21,6 +22,10 @@ class Category extends Api |
|
|
|
* 全部分类数据 |
|
|
|
*/ |
|
|
|
public function all(){ |
|
|
|
$activityTime=Config::getByName('activity_time')['value']; |
|
|
|
if (strtotime($activityTime)<time()){ |
|
|
|
$this->error(__('Activity is end')); |
|
|
|
} |
|
|
|
$all = $this->model |
|
|
|
->where('type','product') |
|
|
|
->where('status','normal') |
|
|
|