实现单选,全选商品
function checkAll(obj, name){
var el = document.getElementsByTagName('input');
var len = el.length;
for (var key in el) {
if(el[Key].name == name){
if(obj.checked == true) {
el[key].checked = true;
} else {
el[key].checked = false;
}
}
}
}
全选商品详情单价数量小计操作
品牌:
经销商:
规格:每
零售价:元
购买日期:
件
¥19.6
首页有个加入购物车图标,在header里,我们可以加入el表达式,实现可以从界面上看出有几件商品,
购物车件
为空
有 1件商品
3、cartcontrlloer.java
@RequestMapping(value = "Order", method = RequestMethod.GET)
public String order(Model model, AlipayForm alipayForm, HttpSession session, Device device) {
GoodsForm goodsForm=new GoodsForm();
//goodsForm.setType("粮食");
//model.addAttribute("goodsForm", goodsForm);
List commodityType = goodsService.getType();
goodsForm.setCommodityTypeId(commodityType.get(0).getCommodityTypeId());
model.addAttribute("goodsForm", goodsForm);
model.addAttribute("commodityType", commodityType);
log.info("重新支付");
CartForm cartForm = new CartForm();
model.addAttribute("cartForm", cartForm);
UVO uvo = (UVO)session.getAttribute("UVO");
if (uvo == null || StringUtils.isEmpty(uvo.getGuestId())) {
return "redirect:/initGuestLogin";
}
cartForm.setGuestId(uvo.getGuestId());
model.addAttribute("cartList", cartService.searchCartList(cartForm));
model.addAttribute("orderList", cartService.searchOrderList(cartForm));
if(device.isNormal()) {
return "shop/order";
} else {
return "mobile/alipay/replayAlipayConfirm";
}