| | |
| | |
|
| | | //跨域访问获取所有电池组的信息<-------跨域----------->
|
| | | public String searchInform_ky(){
|
| | | HttpServletResponse res = ActionUtil.getResponse();
|
| | | res.setHeader("Access-Control-Allow-Origin", "*"); //允许跨域访问
|
| | | res.setHeader("Access-Control-Allow-Headers", "X-Requested-With,content-type,token");
|
| | | res.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH");
|
| | | ServiceModel model;
|
| | | model = service.searchInform_ky();
|
| | | isAllowHeaders(); //允许跨域访问
|
| | | ServiceModel model = new ServiceModel();
|
| | | model = service.searchInform_ky(); |
| | | result = ActionUtil.tojson(model);
|
| | | return SUCCESS;
|
| | | }
|
| | | //首页上显示已安装数和全部基站数
|
| | | public String serchDevice(){
|
| | | User_inf uinf=(User_inf) getUser();
|
| | | ServiceModel model = service.serchDevice(uinf);
|
| | | result = ActionUtil.tojson(model);
|
| | | return SUCCESS;
|
| | | }
|