admin 管理员组

文章数量: 887021


2024年1月11日发(作者:position用法css)

{"data": { "promote": [ { "id": 24, "goods_id": 24, "brief": null, "img": { "thumb": "image/1_", "url": "image/1_", "small": "image/1_" }, "market_price": "0.0", "name": "F2000", "promote_price": "", "shop_price": "0.01" }, { "id": 92, "goods_id": 92, "brief": null, "img": { "thumb": "image/1_", "url": "image/1_", "small": "image/1_" }, "market_price": "0.0", "name": "23000", "promote_price": "", "shop_price": "0.01" } ], "player": [ { "action": null, "action_id": null, "description": null, "photo": { "thumb": null, "url": "image/1_", "small": null }, "url": "" }, { "action": null, "action_id": null, "description": null, "photo": { "thumb": null, "url": "image/1_", "small": null }, "url": "" } ]},"status": { "succeed": 1, "error_code": null, "error_desc": null},"paginated": null,"session": null

}4.控制层controller中@Controller@RequestMapping("/moblieHome")public class Moblie_IndexController { @RequestMapping(value = "/hotSale",produces = "text/html;charset=UTF-8") public String mobileHomeCategory(Model model){ String url="xxxxx/home/data"; String homeDataJsonArrayString=Moblie_on(url); JSONObject jsonObject=null; jsonObject= bject(homeDataJsonArrayString); String data=ing("data"); if(data!=null &&()>0){ n("data==="+data); } jsonObject= bject(data); String promote_goods=ing("promote_goods"); if(data!=null &&()>0){ n("promote_goods==="+promote_goods); } JSONArray jsonArray =NArray("promote_goods"); JSONArray jsonArrayImg=null; JSONObject object=null; JSONObject objectImg=null; List goodsList = new ArrayList(); MobileGoodsBrief good=null; if(jsonArray!=null && ()>0) { for (int i = 0; i < (); i++) { object = NObject(i); good=new MobileGoodsBrief(); pPrice(ing("shop_price")); ce(ing("market_price")); e(ing("name")); objectImg = bject(ing("img").toString()); Url(ing("url")); (good); } } ribute("goodsList",goodsList); return "";}ller传值给jsp,

jsp头部注意添加c标签:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@ taglib prefix="t" uri="/tags-tiles"%><%@ taglib prefix="c" uri="/jsp/jstl/core"%>


本文标签: 添加 用法 注意 标签 作者