| | |
| | |
|
| | | //跨域访问获取所有电池组的信息<-------跨域----------->
|
| | | 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(); //允许跨域访问
|
| | | //System.out.println(key+"@@@@@@@@@@@@@@@@@@@@@@");
|
| | | ServiceModel model = new ServiceModel();
|
| | | if(key != null && CROSS_DOMAIN_KEY.equals(key)){
|
| | | model = service.searchInform_ky(); |
| | | }else{ |
| | | model.setCode(0);
|
| | | model.setMsg("识别码错误");
|
| | | }
|
| | | result = ActionUtil.tojson(model);
|
| | | return SUCCESS;
|
| | | }
|