@@ -101,7 +101,7 @@ class GoodsService extends BaseService
unset($where['a.status']);
}
- $model = $this->model->with(['category'])
+ $model = $this->model->with(['category','skus'])
->from('goods as a')
->where(function ($query) use ($params) {
// 分类
@@ -349,7 +349,7 @@ class GoodsService extends BaseService
return $data;
- $data = $this->model->where(['zone_type'=>$type,'status'=>1,'mark'=>1])
+ $data = $this->model->with(['skus'])->where(['zone_type'=>$type,'status'=>1,'mark'=>1])
->select(['id','thumb','price','market_price','sku_type','goods_name','sales','stock','category_id','type','zone_type','is_new','status'])
->orderBy('sort','desc')
->orderBy('id','asc')