You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.8 KiB
Plaintext
82 lines
2.8 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
|
|
<%@ page import="net.sf.json.JSONObject"%>
|
|
<%@ page import="net.sf.json.JSONArray"%>
|
|
<%@ page import="weaver.general.*" %>
|
|
<%@ page import="weaver.conn.RecordSet" %>
|
|
|
|
|
|
<%
|
|
String action = Util.null2String(request.getParameter("action"));
|
|
if("getSlideImages".equalsIgnoreCase(action)){// 获取幻灯片图片
|
|
JSONArray datas = new JSONArray();
|
|
// 处理屏幕宽度
|
|
int screenWidth = Util.getIntValue(request.getParameter("innerWidth"));
|
|
// int userid = Util.getIntValue(request.getParameter("userid"));
|
|
// String catalogid = Util.null2String(request.getParameter("catalogid"));
|
|
// int counts = Util.getIntValue(request.getParameter("counts"));
|
|
RecordSet rs = new RecordSet();
|
|
rs.executeQuery("select * from uf_yddsylbt order by sx");
|
|
|
|
while (rs.next()){
|
|
if (screenWidth < 600){
|
|
JSONObject data = new JSONObject();
|
|
data.put("action", rs.getString("tpdjlj"));
|
|
data.put("pic_path", rs.getString("tpdzzc"));
|
|
// data.put("pic_desc", rs.getString("id"));
|
|
data.put("pic_desc", "");
|
|
datas.add(data);
|
|
}else {
|
|
JSONObject data = new JSONObject();
|
|
data.put("action", rs.getString("tpdjlj"));
|
|
data.put("pic_path", rs.getString("tpdzzd"));
|
|
// data.put("pic_desc", rs.getString("id"));
|
|
data.put("pic_desc", "");
|
|
datas.add(data);
|
|
}
|
|
}
|
|
|
|
|
|
// if (screenWidth < 600) {
|
|
// data.put("action", "");
|
|
// data.put("pic_path", "/mobilemode/upload/images/961bd94784144f26b35abdae955a3ac4.jpg");
|
|
// data.put("pic_desc", "");
|
|
// datas.add(data);
|
|
// data = new JSONObject();
|
|
// data.put("action", "");
|
|
// data.put("pic_path", "/mobilemode/upload/images/3b8c7ab1ae4f4a72a68cfc272a5fa173.jpg");
|
|
// data.put("pic_desc", "");
|
|
// datas.add(data);
|
|
// data = new JSONObject();
|
|
// data.put("action", "");
|
|
// data.put("pic_path", "/mobilemode/upload/images/28108cf70aa1429ea95c18f1c78e9e8b.jpg");
|
|
// data.put("pic_desc", "");
|
|
// datas.add(data);
|
|
// data = new JSONObject();
|
|
// data.put("action", "");
|
|
// data.put("pic_path", "/mobilemode/upload/images/9b0067f0be064235a41a872837f6b5c2.jpg");
|
|
// data.put("pic_desc", "");
|
|
// datas.add(data);
|
|
// data = new JSONObject();
|
|
// data.put("action", "");
|
|
// data.put("pic_path", "/mobilemode/upload/images/ab9301e55aec47eaa087c0b02a499112.jpg");
|
|
// data.put("pic_desc", "");
|
|
// datas.add(data);
|
|
// }else {
|
|
// data = new JSONObject();
|
|
// data.put("action", "");
|
|
// data.put("pic_path", "/mobilemode/upload/images/9b0067f0be064235a41a872837f6b5c2.jpg");
|
|
// data.put("pic_desc", "");
|
|
// datas.add(data);
|
|
// data = new JSONObject();
|
|
// data.put("action", "");
|
|
// data.put("pic_path", "/mobilemode/upload/images/ab9301e55aec47eaa087c0b02a499112.jpg");
|
|
// data.put("pic_desc", "");
|
|
// datas.add(data);
|
|
// }
|
|
/************** 模拟数据 *****************/
|
|
|
|
out.print(datas.toString());
|
|
}
|
|
|
|
%>
|