|
@@ -145,21 +145,10 @@ class CmsContentTemplateSetRepository
|
|
|
|
|
|
public function productList($request)
|
|
public function productList($request)
|
|
{
|
|
{
|
|
- $area_type = '';
|
|
|
|
- if ($request['area_type'] == 'floor') {
|
|
|
|
- $area_type = 2;
|
|
|
|
- }
|
|
|
|
- $template_set = $this->cmsContentTemplateSet->select('rule')->where(['area_type' => $area_type, 'id' => $request['id']])->first();
|
|
|
|
- if (!$template_set) {
|
|
|
|
- throw new HttpException(500, '没有找到对应模板内容');
|
|
|
|
- }
|
|
|
|
- $template_array = json_decode($template_set->rule, true);
|
|
|
|
-
|
|
|
|
- $product = $this->cmsSubjectProduct->where('subject_id', $template_array['link_url'])->orderBy('sort', 'asc')->get();
|
|
|
|
|
|
+ $product = $this->cmsSubjectProduct->where('subject_id', $request['subject_id'])->orderBy('sort', 'asc')->get();
|
|
$pro_array = $product->toArray();
|
|
$pro_array = $product->toArray();
|
|
$res_id = implode(",", array_column($pro_array, 'product_id'));
|
|
$res_id = implode(",", array_column($pro_array, 'product_id'));
|
|
|
|
|
|
-
|
|
|
|
try {
|
|
try {
|
|
$sign = generateSign(['ids' => $res_id], config('customer.app_secret'));
|
|
$sign = generateSign(['ids' => $res_id], config('customer.app_secret'));
|
|
$url = config("customer.app_service_url") . '/product/homeProduct';
|
|
$url = config("customer.app_service_url") . '/product/homeProduct';
|