|
@@ -541,25 +541,25 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
{
|
|
|
|
|
|
$depart = Department::where('pid',0)->orderBy('id','asc')->get();
|
|
|
- if(isset($data['keyword']) && !empty($data['keyword'])){
|
|
|
- $departments= Department::where('name', 'like', '%' . $data['keyword'] . '%')->get();
|
|
|
- if(empty($departments)){
|
|
|
- $result['message']="未查询到与此相关职能部门";
|
|
|
- }else{
|
|
|
- $count = Department::where('name','like',"%{$data['keyword']}%")->count();
|
|
|
- $m = [
|
|
|
- 'department' => $depart,
|
|
|
- 'type' => $departments,
|
|
|
- 'count' => $count,
|
|
|
- ];
|
|
|
- }
|
|
|
-
|
|
|
- $result['sele'] = $m;
|
|
|
- return Result::success($result['sele']);
|
|
|
-
|
|
|
- }
|
|
|
- $result = $depart;
|
|
|
- return Result::success($result);
|
|
|
+ // if(isset($data['keyword']) && !empty($data['keyword'])){
|
|
|
+ // $departments= Department::where('name', 'like', '%' . $data['keyword'] . '%')->get();
|
|
|
+ // if(empty($departments)){
|
|
|
+ // $result['message']="未查询到与此相关职能部门";
|
|
|
+ // }else{
|
|
|
+ // $count = Department::where('name','like',"%{$data['keyword']}%")->count();
|
|
|
+ // $m = [
|
|
|
+ // 'department'=>$depart,
|
|
|
+ // 'type'=>$departments,
|
|
|
+ // 'count'=>$count
|
|
|
+ // ];
|
|
|
+ // }
|
|
|
+
|
|
|
+ // $result['sele'] = $m;
|
|
|
+ // return Result::success($result['sele']);
|
|
|
+
|
|
|
+ // }
|
|
|
+ $result=$depart;
|
|
|
+ return Result::success($result);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -569,7 +569,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
*/
|
|
|
public function selectWebsiteArea(array $data): array
|
|
|
{
|
|
|
- $provinces=District::where('pid',0)->where('status',1)->get();
|
|
|
+ $provinces=District::where('pid',0)->where('status',1)->orderBy('code')->get();
|
|
|
|
|
|
if(isset($data['province'])){
|
|
|
$province=District::where('pid',0)->where('status',1)->where('id',$data['province'])->orderBy('code')->get();
|
|
@@ -656,12 +656,12 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
$result[$k]['children_count'] = 0;
|
|
|
}
|
|
|
}
|
|
|
- return Result::success($result);
|
|
|
- if (!empty($result)) {
|
|
|
- return Result::success($result);
|
|
|
- } else {
|
|
|
- return Result::error("本网站暂无栏目", 0);
|
|
|
- }
|
|
|
+ // return Result::success($result);
|
|
|
+ if(!empty($result)){
|
|
|
+ return Result::success($result);
|
|
|
+ }else{
|
|
|
+ return Result::error("本网站暂无栏目",0);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|