|
@@ -1237,10 +1237,11 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
}
|
|
}
|
|
|
// 通栏分类:1:资讯类:2:通栏广告类;3:混合类;4:头条类;5:轮播图类;
|
|
// 通栏分类:1:资讯类:2:通栏广告类;3:混合类;4:头条类;5:轮播图类;
|
|
|
$sector_code = [
|
|
$sector_code = [
|
|
|
- 'sectorName' => $data['sector_name'],
|
|
|
|
|
- 'sectorId' => $data['sector_id'],
|
|
|
|
|
- 'sectorType' => $data['sector_type'],
|
|
|
|
|
- 'sectorPlace' => $data['place_type'],
|
|
|
|
|
|
|
+ $data['sector_id'] => [
|
|
|
|
|
+ 'sectorName' => $data['sector_name'],
|
|
|
|
|
+ 'sectorHeight' => $data['pic_height'],
|
|
|
|
|
+ 'sectorImg' => $data['sector_img'],
|
|
|
|
|
+ ]
|
|
|
];
|
|
];
|
|
|
// return Result::success($sector_code);
|
|
// return Result::success($sector_code);
|
|
|
$data['sector_code'] = json_encode($sector_code);
|
|
$data['sector_code'] = json_encode($sector_code);
|
|
@@ -1331,10 +1332,11 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
$sector_code = [
|
|
$sector_code = [
|
|
|
- 'sectorName' => strval($data['sector_name']),
|
|
|
|
|
- 'sectorId' => intval($data['sector_id']),
|
|
|
|
|
- 'sectorType' => intval($data['sector_type']),
|
|
|
|
|
- 'sectorPlace' => intval($data['place_type']),
|
|
|
|
|
|
|
+ $data['sector_id'] => [
|
|
|
|
|
+ 'sectorName' => $data['sector_name'],
|
|
|
|
|
+ 'sectorHeight' => $data['pic_height'],
|
|
|
|
|
+ 'sectorImg' => $data['sector_img'],
|
|
|
|
|
+ ]
|
|
|
];
|
|
];
|
|
|
// return Result::success($sector_code);
|
|
// return Result::success($sector_code);
|
|
|
$data['sector_code'] = json_encode($sector_code);
|
|
$data['sector_code'] = json_encode($sector_code);
|
|
@@ -2679,6 +2681,9 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
->orderBy('component.sort_id')
|
|
->orderBy('component.sort_id')
|
|
|
->orderBy('sector_component.sector_id')
|
|
->orderBy('sector_component.sector_id')
|
|
|
->get()->all();
|
|
->get()->all();
|
|
|
|
|
+ if(empty($sector)){
|
|
|
|
|
+ return Result::error('通栏不存在!');
|
|
|
|
|
+ }
|
|
|
$com_num = array_count_values(array_column($sector,'sector_id'));
|
|
$com_num = array_count_values(array_column($sector,'sector_id'));
|
|
|
// 使用 array_keys 和 array_diff 函数,不使用循环将值不为 1 的字段键提取到 $sectors_key 中
|
|
// 使用 array_keys 和 array_diff 函数,不使用循环将值不为 1 的字段键提取到 $sectors_key 中
|
|
|
$sectors_key = array_keys(array_diff($com_num, [1]));
|
|
$sectors_key = array_keys(array_diff($com_num, [1]));
|