|
@@ -161,4 +161,19 @@ class Home extends Base_Controller {
|
|
|
}
|
|
|
exit(json_result('0000',$this->response['0000'],array('list'=>$fields)));
|
|
|
}
|
|
|
+
|
|
|
+ // 路灯下拉列表
|
|
|
+ public function lamp_list(){
|
|
|
+ $networkid = intval($this->input->post('networkid',true));
|
|
|
+ $projectid = intval($this->input->post('projectid',true));
|
|
|
+ if (empty($networkid) && empty($projectid)) {
|
|
|
+ exit(json_result('0405',$this->response['0405'],array()));
|
|
|
+ }
|
|
|
+ if (!empty($networkid)) {
|
|
|
+ $data = $this->Lamp_model->get_list(array('networkid'=>$networkid), 'number,id');
|
|
|
+ }else{
|
|
|
+ $data = $this->Lamp_model->get_list(array('projectid'=>$projectid), 'number,id');
|
|
|
+ }
|
|
|
+ exit(json_result('0000',$this->response['0000'],$data));
|
|
|
+ }
|
|
|
}
|