正在显示
2 个修改的文件
包含
27 行增加
和
9 行删除
| @@ -34,13 +34,9 @@ class NavController extends BaseController | @@ -34,13 +34,9 @@ class NavController extends BaseController | ||
| 34 | //获取菜单组排序字段 | 34 | //获取菜单组排序字段 |
| 35 | $groupInfo = $navGroup->read(['id'=>$this->param['group_id']]); | 35 | $groupInfo = $navGroup->read(['id'=>$this->param['group_id']]); |
| 36 | if(!empty($groupInfo['sort_list'])){ | 36 | if(!empty($groupInfo['sort_list'])){ |
| 37 | + $data = []; | ||
| 37 | $sort_list = json_decode($groupInfo['sort_list']); | 38 | $sort_list = json_decode($groupInfo['sort_list']); |
| 38 | - foreach ($sort_list as $k => $v){ | ||
| 39 | - if(isset($v['sub']) && !empty($v['sub'])){ | ||
| 40 | 39 | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - } | ||
| 44 | }else{ | 40 | }else{ |
| 45 | $data = array(); | 41 | $data = array(); |
| 46 | foreach ($lists as $v){ | 42 | foreach ($lists as $v){ |
| @@ -54,8 +50,30 @@ class NavController extends BaseController | @@ -54,8 +50,30 @@ class NavController extends BaseController | ||
| 54 | $this->response('success',Code::SUCCESS,$data); | 50 | $this->response('success',Code::SUCCESS,$data); |
| 55 | } | 51 | } |
| 56 | 52 | ||
| 57 | - public function getNavList(){ | ||
| 58 | - | 53 | + /** |
| 54 | + * @remark :根据固定的数组排序 | ||
| 55 | + * @name :findDetailsInList | ||
| 56 | + * @author :lyh | ||
| 57 | + * @method :post | ||
| 58 | + * @time :2023/12/18 14:54 | ||
| 59 | + */ | ||
| 60 | + public function findDetailsInList($data, $detailsList) { | ||
| 61 | + $result = []; | ||
| 62 | + foreach ($data as $item) { | ||
| 63 | + $id = $item['id']; | ||
| 64 | + // 在给定的详情列表中查找匹配的id | ||
| 65 | +// $matchingDetail = array_filter($detailsList, function ($detail) use ($id) { | ||
| 66 | +// return $detail['id'] == $id; | ||
| 67 | +// }); | ||
| 68 | +// if (!empty($matchingDetail)) { | ||
| 69 | +// $item['details'] = reset($matchingDetail); | ||
| 70 | +// } | ||
| 71 | + if (!empty($item['sub'])) { | ||
| 72 | + $item['sub'] = findDetailsInList($item['sub'], $detailsList); | ||
| 73 | + } | ||
| 74 | + $result[] = $item; | ||
| 75 | + } | ||
| 76 | + return $result; | ||
| 59 | } | 77 | } |
| 60 | 78 | ||
| 61 | /** | 79 | /** |
| @@ -714,7 +714,7 @@ class ProjectLogic extends BaseLogic | @@ -714,7 +714,7 @@ class ProjectLogic extends BaseLogic | ||
| 714 | 'company_name'=>$projectInfo['company'], | 714 | 'company_name'=>$projectInfo['company'], |
| 715 | 'principal_mobile'=>$projectInfo['mobile'], | 715 | 'principal_mobile'=>$projectInfo['mobile'], |
| 716 | 'remark'=>'', | 716 | 'remark'=>'', |
| 717 | - 'exclusive_aicc_day'=>$projectInfo['exclusive_aicc_day'] ?: 1, | 717 | + 'exclusive_aicc_day'=>$this->param['exclusive_aicc_day'] ?: 1, |
| 718 | 'from_order_id'=>$projectInfo['from_order_id'] | 718 | 'from_order_id'=>$projectInfo['from_order_id'] |
| 719 | ]; | 719 | ]; |
| 720 | $this->toAicc($data); | 720 | $this->toAicc($data); |
| @@ -724,7 +724,7 @@ class ProjectLogic extends BaseLogic | @@ -724,7 +724,7 @@ class ProjectLogic extends BaseLogic | ||
| 724 | $data = [ | 724 | $data = [ |
| 725 | 'company_name'=>$projectInfo['company'], | 725 | 'company_name'=>$projectInfo['company'], |
| 726 | 'principal_mobile'=>$projectInfo['mobile'], | 726 | 'principal_mobile'=>$projectInfo['mobile'], |
| 727 | - 'exclusive_hagro_day'=>$projectInfo['exclusive_hagro_day'] ?: 1, | 727 | + 'exclusive_hagro_day'=>$this->param['exclusive_hagro_day'] ?: 1, |
| 728 | 'from_order_id'=>$projectInfo['from_order_id'], | 728 | 'from_order_id'=>$projectInfo['from_order_id'], |
| 729 | 'company_id'=>$projectInfo['channel']['channel_id'] | 729 | 'company_id'=>$projectInfo['channel']['channel_id'] |
| 730 | ]; | 730 | ]; |
-
请 注册 或 登录 后发表评论