...
|
...
|
@@ -262,6 +262,12 @@ class IndexController extends RestBaseController |
|
|
}
|
|
|
$acronym =array_values(array_unique($acronym));
|
|
|
sort($acronym);
|
|
|
if(in_array('#',$acronym)){
|
|
|
//去掉第一个
|
|
|
array_shift($acronym);
|
|
|
//增加一个到最后
|
|
|
array_push($acronym,'#');
|
|
|
}
|
|
|
$arr1 = [];
|
|
|
foreach($acronym as $a_key=>$a_value){
|
|
|
$k = 0;
|
...
|
...
|
@@ -275,27 +281,7 @@ class IndexController extends RestBaseController |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(in_array('#',$acronym)){
|
|
|
$count = count($acronym);
|
|
|
foreach ($arr1 as $key=>$a_value){
|
|
|
if($a_value['acronym'] == '#'){
|
|
|
$arr1[$count-1] = $a_value;
|
|
|
}else{
|
|
|
$arr1[$key-1] = $a_value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
foreach($acronym as $key1=>$a_value1){
|
|
|
if($a_value1 == '#'){
|
|
|
$acronym[$count-1] = $a_value1;
|
|
|
}else{
|
|
|
$acronym[$key1-1] = $a_value1;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$arr2['project_a'] = $acronym;
|
|
|
$arr2['project_a'] = $acronym;//首字母数组
|
|
|
$arr2['project_n'] = $arr1;
|
|
|
}
|
|
|
|
...
|
...
|
|