您的位置:首页 > 其它

list

2015-08-12 00:00 169 查看
在list.html

<div class="row">
<div class="btn-group btn-group-sm btn-sort col-sm-6" role="group" >
<span th:if="${#strings.isEmpty(goodsForm.commodityName)}">
<a th:href="@{initGoods(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==1?'btn btn-default btn-danger':'btn btn-default'"> 默 认 </a>
<a th:href="@{initGoodsByPopularDesc(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==3?'btn btn-default btn-danger':'btn btn-default'" th:if="${orderTypeId}!=2"> 人 气<i></i> </a>
<a th:href="@{initGoodsByPopular(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==2?'btn btn-default btn-danger':'btn btn-default'" th:if="${orderTypeId}==2"> 人 气<i class="up"></i> </a>
<a th:href="@{initGoodsByPriceDesc(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==5?'btn btn-default btn-danger':'btn btn-default'" th:if="${orderTypeId}!=4"> 价 格<i></i> </a>
<a th:href="@{initGoodsByPrice(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==4?'btn btn-default btn-danger':'btn btn-default'" th:if="${orderTypeId}==4"> 价 格<i class="up"></i> </a></span></div>
<div class="col-sm-6 flipBox">
<h4 class="h5">共 <span th:text="${list.size()}"> 999 条记录</span> 条记录</h4></div></div>
<form action="addCart" th:object="${goodsForm}" method="post">
<ul class="goodsList cf">
<li class="col-md-2 col-sm-4 col-xs-6" th:each="goodsInfo,status:${list}">
<div class="cont">
<a th:href="@{initGoodsDetail(commodityId=${goodsInfo.commodityId})}"><img th:src="@{showImage(pictureId=${goodsInfo.pictureId})}" alt="" style="height:168px;width:168px;"/></a>
<h4 class="h5"><a th:href="@{initGoodsDetail(commodityId=${goodsInfo.commodityId})}"><p th:text="${goodsInfo.commodityName}">品美知糖道阿胶姜汤260g</p></a></h4>
<p class="num">库存:<span th:text="${goodsInfo.stock}">15</span>
每<span th:text="${#strings.concat(goodsInfo.unit).concat(goodsInfo.specifications)}">袋15kg</span>
</p>
<p class="cf">
<span class="price yh">¥<span th:text="${goodsInfo.retailPrice}">15</span>元</span>
<a th:href="@{initGoodsDetail(commodityId=${goodsInfo.commodityId})}" class="btnBuy" title="加入购物车"></a>
</p></div></li></ul></form></div>

在goodscontroller.java

给人气、默认、价格写controller
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: