list

在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'">&nbsp;默&nbsp;认&nbsp;</a>
<a th:href="@{initGoodsByPopularDesc(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==3?'btn btn-default btn-danger':'btn btn-default'" th:if="${orderTypeId}!=2">&nbsp;人&nbsp;气<i></i>&nbsp;</a>
<a th:href="@{initGoodsByPopular(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==2?'btn btn-default btn-danger':'btn btn-default'" th:if="${orderTypeId}==2">&nbsp;人&nbsp;气<i class="up"></i>&nbsp;</a>
<a th:href="@{initGoodsByPriceDesc(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==5?'btn btn-default btn-danger':'btn btn-default'" th:if="${orderTypeId}!=4">&nbsp;价&nbsp;格<i></i>&nbsp;</a>
<a th:href="@{initGoodsByPrice(commodityTypeId=${goodsForm.commodityTypeId})}" th:class="${orderTypeId}==4?'btn btn-default btn-danger':'btn btn-default'" th:if="${orderTypeId}==4">&nbsp;价&nbsp;格<i class="up"></i>&nbsp;</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

转载于:https://my.oschina.net/u/2411775/blog/491493

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值